);
// Output it
- ApplicationEntryPoint::app_die(sprintf("<strong>%s debug output:</strong>%s", $this->__toString(), $content));
+ ApplicationEntryPoint::app_die(sprintf("<strong>%s debug output:</strong><div id=\"debug_content\">%s</div>Loaded includes: <div id=\"debug_include_list\">%s</div>",
+ $this->__toString(),
+ $content,
+ ClassLoader::getInstance()->getPrintableIncludeList()
+ ));
}
/**
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Should never be executed...
- echo "<strong>This should never be executed!</strong><pre>";
- debug_print_backtrace();
- die("</pre>Good bye...");
+ $this->debugBacktrace();
}
/**
* @return void
*/
public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
+ // Add more filters by the command
+ $commandInstance->addExtraFilters($this);
+
// Run the pre filters
$this->executePreFilters($requestInstance, $responseInstance);
* @return void
*/
public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
+ // Add more filters by the command
+ $commandInstance->addExtraFilters($this);
+
// Run the pre filters
$this->executePreFilters($requestInstance, $responseInstance);
// Get command instance from resolver
$commandInstance = $this->getResolverInstance()->resolveCommand($formAction);
- // Try to add more filters by the command
+ // Add more filters by the command
$commandInstance->addExtraFilters($this);
// Try to run the pre filters, if auth exceptions come through redirect here
* @return void
*/
public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
+ // Add more filters by the command
+ $commandInstance->addExtraFilters($this);
+
// Try to run the pre filters, if auth exceptions come through redirect here
try {
// Run the pre filters
* @return void
*/
public final function outputStream ($output) {
- print html_entity_decode(strip_tags($output));
+ print(html_entity_decode(strip_tags($output)));
}
/**
* @return void
*/
public final function output ($outStream=false) {
- print $outStream;
+ print($outStream);
}
}
}
// Debug output
- //echo "<strong>----- ".__METHOD__." -----</strong><br />\n";
- //print($class."<pre>");
- //debug_print_backtrace();
- //var_dump($isValid);
- //print("</pre>");
+ //* DEBUG: */ $this->debugBacktrace();
// Set command name
$this->setCommandName($commandName);
*/
private function loadController ($commandName) {
// Debug message
- //print("<strong>----- ".__METHOD__." -----</strong><pre>");
- //debug_print_backtrace();
- //print("</pre>");
- //
+ //* DEBUG: */ $this->debugBacktrace();
// Cache default command
$defaultCommand = $this->getConfigInstance()->readConfig('default_command');
// Count this include
$this->total++;
+ // Mark this class as loaded
+ $this->loadedClasses[] = $this->classes[$fileName];
+
// Developer mode excludes caching (better debugging)
if (!defined('DEVELOPER')) {
- // Mark this class as loaded
- $this->loadedClasses[] = $this->classes[$fileName];
-
// Reset cache
$this->classesCached = false;
} // END - if
public final function getTotal () {
return $this->total;
}
+
+ /**
+ * Getter for a printable list of included classes/interfaces/exceptions
+ *
+ * @param $includeList A printable include list
+ */
+ public function getPrintableIncludeList () {
+ // Prepare the list
+ $includeList = "";
+ foreach ($this->loadedClasses as $classFile) {
+ $includeList .= basename($classFile)."<br />\n";
+ } // END - foreach
+
+ // And return it
+ return $includeList;
+ }
}
// [EOF]