<?php
@package @category @author @since @package @filesource
@version $Id: TableConfig.php,v 1.1 2008/05/02 14:26:37 c0il Exp $
class PHP_Debug_Renderer_HTML_TableConfig
{
@var @since
protected static $options = array();
@var @since
protected static $instance = null;
@since
protected function __construct()
{
self::$options['HTML_TABLE_disable_credits'] = false;
self::$options['HTML_TABLE_show_templates'] = true;
self::$options['HTML_TABLE_remove_templates_pattern'] = false;
self::$options['HTML_TABLE_templates_pattern'] = array();
self::$options['HTML_TABLE_show_globals'] = false;
self::$options['HTML_TABLE_enable_search'] = true;
self::$options['HTML_TABLE_show_super_array'] = true;
self::$options['HTML_TABLE_use_request_arr'] = false;
self::$options['HTML_TABLE_view_source_script_path'] = '.';
self::$options['HTML_TABLE_view_source_script_name'] = 'PHP_Debug_ShowSource.php';
self::$options['HTML_TABLE_css_path'] = 'css';
self::$options['HTML_TABLE_view_source_tabsize'] = 4;
self::$options['HTML_TABLE_view_source_numbers'] = 2;
self::$options['HTML_TABLE_search_forced_type'] = array(
PHP_DebugLine::TYPE_STD => false,
PHP_DebugLine::TYPE_QUERY => false,
PHP_DebugLine::TYPE_QUERYREL => false,
PHP_DebugLine::TYPE_ENV => false,
PHP_DebugLine::TYPE_APPERROR => false,
PHP_DebugLine::TYPE_CREDITS => false,
PHP_DebugLine::TYPE_SEARCH => true,
PHP_DebugLine::TYPE_DUMP => false,
PHP_DebugLine::TYPE_PROCESSPERF => false,
PHP_DebugLine::TYPE_TEMPLATES => false,
PHP_DebugLine::TYPE_PAGEACTION => false,
PHP_DebugLine::TYPE_SQLPARSE => false,
PHP_DebugLine::TYPE_WATCH => false,
PHP_DebugLine::TYPE_PHPERROR => false
);
self::$options['HTML_TABLE_header'] = '
<div id="pd-div">
<br />
<a name="pd-anchor" id="pd-anchor" />
<table class="pd-table" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="pd-table-header" align="center">File</td>
<td class="pd-table-header" align="center">Line</td>
<td class="pd-table-header" align="center">Inside/From function</td>
<td class="pd-table-header" align="center">Inside/From Class</td>
<td class="pd-table-header" align="center">Type</td>
<td class="pd-table-header" align="center">Debug information</td>
<td class="pd-table-header" align="center">Execution time (sec)</td>
</tr>
';
self::$options['HTML_TABLE_credits'] = '
PHP_Debug ['. PHP_Debug::PEAR_RELEASE .'] | By COil (2007) |
<a href="http://www.coilblog.com">http://www.coilblog.com</a> |
<a href="http://phpdebug.sourceforge.net/">PHP_Debug Project Home</a>
';
self::$options['HTML_TABLE_simple_header'] = '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Pear::PHP_Debug</title>
';
self::$options['HTML_TABLE_simple_footer'] = '
</body>
</html>
';
self::$options['HTML_TABLE_prerow'] = '
<tr>';
self::$options['HTML_TABLE_interrow_file'] = '
<td class="pd-td" align="center">';
self::$options['HTML_TABLE_interrow_line'] = '
</td>
<td class="pd-td" align="center">';
self::$options['HTML_TABLE_interrow_function'] = self::$options['HTML_TABLE_interrow_line'];
self::$options['HTML_TABLE_interrow_class'] = self::$options['HTML_TABLE_interrow_line'];
self::$options['HTML_TABLE_interrow_type'] = self::$options['HTML_TABLE_interrow_line'];
self::$options['HTML_TABLE_interrow_time'] = self::$options['HTML_TABLE_interrow_line'];
self::$options['HTML_TABLE_interrow_info'] = '
</td>
<td class="pd-td" align="left">';
self::$options['HTML_TABLE_postrow'] = '
</td>
</tr>
';
self::$options['HTML_TABLE_footer'] = '
</table>
</div>
';
}
@since @see
public static function singleton()
{
if (!isset(self::$instance)) {
$class = __CLASS__;
self::$instance = new $class;
}
return self::$instance;
}
@since @see
public static function getConfig()
{
return self::$options;
}
@since
public function __toString()
{
return '<pre>'. PHP_Debug::dumpVar(
$this->singleton()->getConfig(),
__CLASS__,
false,
PHP_DEBUG_DUMP_ARR_STR). '</pre>';
}
} |