Exemplo n.º 1
0
 public static function display()
 {
     if (self::$enabled && CoreController::getInstance() != NULL) {
         // keeps only main request with controller
         // if(self::$enabled) { // all requests (if uncommented, html ressources might fail if stdout enabled)
         if (self::$out === "stdout" || self::$out === "both") {
             foreach (self::$content as $msg) {
                 echo "Debug: " . $msg . "<br />";
             }
         }
         if (self::$out === "file" || self::$out === "both") {
             $file = fopen(self::$outfile, 'a');
             if (!$file) {
                 return;
             }
             foreach (self::$content as $msg) {
                 fwrite($file, $msg . PHP_EOL);
             }
             fclose($file);
         }
     }
 }
Exemplo n.º 2
0
 public static function &getInstance()
 {
     return CoreController::getInstance();
 }