/** * Debug_Renderer_HTML_Table class constructor * * @since V2.0.0 - 13 apr 2006 */ function __construct($DebugObject, $options) { $this->DebugObject = $DebugObject; $this->defaultOptions = Debug_Renderer_HTML_Table_Config::singleton()->getConfig(); $this->setOptions($options); //Debug::dumpVar($this->options, "Debug_Renderer_HTML_Table::options"); // Now add in first the predefined debugline depending on the configuration if ($this->options['HTML_TABLE_enable_search'] == true) { $this->DebugObject->addDebugFirst(STR_N, PHP_DEBUGLINE_SEARCH); } if ($this->options['HTML_TABLE_disable_credits'] == false) { $this->DebugObject->addDebugFirst($this->options['HTML_TABLE_credits'], PHP_DEBUGLINE_CREDITS); } // Now add in last positions the others predefined debuglines // Add execution time $this->DebugObject->addDebug(STR_N, PHP_DEBUGLINE_PROCESSPERF); // Add templates if ($this->options['HTML_TABLE_show_templates'] == true) { $this->DebugObject->addDebug(STR_N, PHP_DEBUGLINE_TEMPLATES); } // Add env variables $this->addSuperArray(); }
* @filesource */ // Additional include path for Pear (to adapt to your configuration ) //require_once '../../config/ApplicationCfg.php'; set_include_path(PD_WEB_PEAR_ROOT . PATH_SEPARATOR . get_include_path()); // End // //Include Pear require_once 'PEAR.php'; //Include Debug_Renderer_HTML_Table_Config to get the configuration require_once 'Debug.php'; require_once 'Debug/Renderer/HTML_Table_Config.php'; //Include the class definition of highlighter require_once 'Text/Highlighter.php'; require_once 'Text/Highlighter/Renderer/Html.php'; // Get View source configuration $options = Debug_Renderer_HTML_Table_Config::singleton()->getConfig(); //Debug::dumpVar($options, '$options'); // Buil the array options for the HTML renderer to get the nice file numbering $rendOptions = array('numbers' => $options['HTML_TABLE_view_source_numbers'], 'tabsize' => $options['HTML_TABLE_view_source_tabsize']); // Finish parser object creation $renderer = new Text_Highlighter_Renderer_Html($rendOptions); $phpHighlighter = Text_Highlighter::factory("PHP"); $phpHighlighter->setRenderer($renderer); // Now make output, header $header = str_replace('<title>PEAR::PHP_Debug</title>', '<title>PEAR::PHP_Debug::View_Source::' . $_GET['file'] . '</title>', $options['HTML_TABLE_simple_header']); print $header; // Print style sheet print $options['HTML_TABLE_view_source_stylesheet']; // Output source print ' </head>
/** * returns the static instance of the class * * @since V2.0.0 - 11 apr 2006 * @see PHP_Debug */ public static function singleton() { if (!isset(self::$instance)) { $class = __CLASS__; self::$instance = new $class(); } return self::$instance; }