Strange results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




So, I have this class which contains a method LoadIO. I was doing some debugging as to why a condition wouldn't pass like I thought it would, and It's starting to piss me off.

The three echo's near the bottom are not printing what it should. The middle echo is not even printing static text.

Here's the definition:

/***********
  * Public Method LoadIO
  * INCOMPLETE
  * @param $fpType Integer
  * @param $fpName String
  * @throws FileException
  * @return Object
  ***
  * LoadIO handles the loading of IO modules. IO modules are stored in
  * - /system/IO/     // System IO files
  * - /IO/            // User defined third party modules
  ***********/
const mciInput = 0;
 const mciOutput = 1;
public function loadIO($fpType, $fpName) {
   global $gcIOPath, $gcSystemPath;
//
   // Check paramaters for syntatic validity
   //
   if ( $fpType != Ember::mciInput && $fpType != Ember::mciOutput ) {
     throw new Exception('Invalid \'fpType\' paramater', 1002);
   }
//
   // Variable assignment
   //
   $fType = ($fpType == self::mciInput) ? 'Input' : 'Output';
   $fFile  = $gcIOPath . $fType . '/' . $fpName . '.php';
// Check User IO Path first.
   // If it does not exist there, check the System IO Path
if ( !file_exists($fFile) ) { $fFile = $gcSystemPath . 'IO/' . $fType . '/' . $fpName . '.php'; if ( !file_exists($fFile) ) { throw new Exception("File '$fpName.php' not found.", 1001);
     }
   }
if ( !(include_once $fFile) ) throw new Exception("File '$fFile' could not be included.");

   echo 'stage 1<br />';
   echo "-" & $fpType & "- is equal to " & self::mciInput & "<br />";
   echo 'stage 2<br />';
if ( $fpType == self::mciInput ) {
     echo 5;
     array_push($this->maInput, new $fpName);
     echo 'it\'s done';
   }
}


The Call:

$Page->loadIO(Ember::mciOutput, 'html');


The Output:

stage 1
0stage 2

HELP!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux