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); } } }
public static function &getInstance() { return CoreController::getInstance(); }