* @since V2.1.0 - 29 march 2007
*
* @package PHP_Debug
* @filesource
*
* @version CVS: $Id: DivConfig.php,v 1.3 2008/10/05 14:41:37 c0il Exp $
*/
class PHP_Debug_Renderer_HTML_DivConfig
{
/**
* Config container for Debug_Renderer_HTML_Div
*
* @var array
* @since V2.0.0 - 11 apr 2006
*/
protected static $options = array();
/**
* Static Instance of class
*
* @var array
* @since V2.0.0 - 11 apr 2006
*/
protected static $instance = null;
/**
* Debug_Renderer_HTML_DIV_Config class constructor
*
* @since V2.0.0 - 11 apr 2006
*/
protected function __construct()
{
/**
* Enable or disable Credits in debug infos
*/
self::$options['HTML_DIV_disable_credits'] = false;
/**
* Enable or disable pattern removing in included files
*/
self::$options['HTML_DIV_remove_templates_pattern'] = false;
/**
* Pattern list to remove in the display of included files
* if HTML_DIV_remove_templates_pattern is set to true
*/
self::$options['HTML_DIV_templates_pattern'] = array();
/**
* View Source script path
*/
self::$options['HTML_DIV_view_source_script_path'] = '.';
/**
* View source script file name
*/
self::$options['HTML_DIV_view_source_script_name'] = 'PHP_Debug_ShowSource.php';
/**
* Tabsize for view source script
*/
self::$options['HTML_DIV_view_source_tabsize'] = 4;
/**
* Tabsize for view source script
*/
self::$options['HTML_DIV_view_source_numbers'] = 2; //HL_NUMBERS_TABLE
/**
* images
*/
self::$options['HTML_DIV_images_path'] = 'images';
self::$options['HTML_DIV_image_info'] = 'info.png';
self::$options['HTML_DIV_image_warning'] = 'warning.png';
self::$options['HTML_DIV_image_error'] = 'error.png';
/**
* css path
*/
self::$options['HTML_DIV_css_path'] = 'css';
/**
* js path
*/
self::$options['HTML_DIV_js_path'] = 'js';
/**
* Class name of the debug info levels
*/
self::$options['HTML_DIV_debug_level_classes'] = array(
PHP_DebugLine::INFO_LEVEL => 'sfWebDebugInfo',
PHP_DebugLine::WARNING_LEVEL => 'sfWebDebugWarning',
PHP_DebugLine::ERROR_LEVEL => 'sfWebDebugError',
);
/**
* After this goes all HTML related variables
*
* HTML code for header
*/
self::$options['HTML_DIV_header'] = '
';
/**
* HTML code for validation debug tab
*/
self::$options['HTML_DIV_sfWebDebugW3CDetails'] = '
';
/**
* HTML code for a row of a validation error
*/
self::$options['HTML_DIV_sfWebDebugW3CTableHeader'] = '
{$title}
| n° |
Line |
Col |
Message |
';
/**
* HTML code for a row of a validation error
*/
self::$options['HTML_DIV_sfWebDebugW3CErrorRow'] = '
| {$cpt} |
{$line} |
{$col} |
{$message}
|
';
/**
* HTML code for debug time tab
*/
self::$options['HTML_DIV_sfWebDebugTimeDetails'] = '
Timers
| type |
time (ms) |
percent |
| {$txtExecutionTime} |
{$processTime} |
100% |
| {$txtPHP} |
{$phpTime} |
{$phpPercent}% |
| {$txtSQL} |
{$sqlTime} |
{$sqlPercent}% : {$queryCount} {$txtQuery} |
{$buffer}
';
/**
* HTML code for database tab
*/
self::$options['HTML_DIV_sfWebDebugDatabaseDetails'] = '
';
/**
* HTML code for Log & msg tab
*/
self::$options['HTML_DIV_sfWebDebugLog'] = '
Log and debug messages
| # |
type |
file |
line |
class |
function |
time |
message |
{$buffer}
';
/**
* HTML code for Vars & config tab
*/
self::$options['HTML_DIV_sfWebDebugConfig'] = '
Configuration and request variables
Request 
{$sfWebDebugRequest}
Response 
{$sfWebDebugResponse}
Settings 
{$sfWebDebugSettings}
Constants 
{$sfWebDebugConstants}
Globals 
{$sfWebDebugGlobals}
Php 
{$sfWebDebugPhp}
Files 
{$sfWebDebugFiles}
';
/**
* HTML code for credits
*/
self::$options['HTML_DIV_credits'] = '
PHP_Debug ['. PHP_Debug::PEAR_RELEASE .'] | By COil (2008) |
http://www.strangebuzz.com |
PHP_Debug Project Home |
Original idea from the symfony framework
';
/**
* HTML code for a basic header
*/
self::$options['HTML_DIV_simple_header'] = '
Pear::PHP_Debug
';
/**
* HTML code for a basic footer
*/
self::$options['HTML_DIV_simple_footer'] = '
';
/**
* HTML code for footer
*/
self::$options['HTML_DIV_footer'] = '
';
}
/**
* 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;
}
/**
* returns the configuration
*
* @since V2.0.0 - 07 apr 2006
* @see PHP_Debug
*/
public static function getConfig()
{
return self::$options;
}
/**
* HTML_DIV_Config
*
* @since V2.0.0 - 26 Apr 2006
*/
public function __toString()
{
return ''. PHP_Debug::dumpVar(
$this->singleton()->getConfig(),
__CLASS__,
false,
PHP_DEBUG_DUMP_ARR_STR). '';
}
}