PHP_Debug
[ class tree: PHP_Debug ] [ index: PHP_Debug ] [ all elements ]

Source for file TableConfig.php

Documentation is available at TableConfig.php

  1. <?php
  2.  
  3. /**
  4.  * Configuration file for HTML_Table renderer
  5.  *
  6.  * @package PHP_Debug
  7.  * @category PHP
  8.  * @author Loic Vernet <qrf_coil at yahoo dot fr>
  9.  * @since V2.0.0 - 10 Apr 2006
  10.  * 
  11.  * @package PHP_Debug
  12.  * @filesource
  13.  * 
  14.  * @version    CVS: $Id: TableConfig.php,v 1.1 2008/05/02 14:26:37 c0il Exp $
  15.  */
  16.  
  17. {    
  18.     /**
  19.      * Config container for Debug_Renderer_HTML_Table
  20.      * 
  21.      * @var array 
  22.      * @since V2.0.0 - 11 apr 2006
  23.      */
  24.     protected static $options = array();
  25.     
  26.     /**
  27.      * Static Instance of class
  28.      *  
  29.      * @var array 
  30.      * @since V2.0.0 - 11 apr 2006
  31.      */
  32.     protected static $instance = null;
  33.         
  34.     /**
  35.      * Debug_Renderer_HTML_Table_Config class constructor
  36.      * 
  37.      * @since V2.0.0 - 11 apr 2006
  38.      */
  39.     protected function __construct()
  40.     {
  41.         /**
  42.          * Enable or disable Credits in debug infos 
  43.          */
  44.         self::$options['HTML_TABLE_disable_credits'= false;
  45.  
  46.         /**
  47.          * Enable or disable included and required files
  48.          */ 
  49.         self::$options['HTML_TABLE_show_templates'= true;
  50.         
  51.         /**
  52.          * Enable or disable pattern removing in included files
  53.          */
  54.         self::$options['HTML_TABLE_remove_templates_pattern'= false;
  55.         
  56.         /**
  57.          * Pattern list to remove in the display of included files
  58.          * if HTML_TABLE_remove_templates_pattern is set to true
  59.          */ 
  60.         self::$options['HTML_TABLE_templates_pattern'= array()
  61.  
  62.         /**
  63.          * Enable or disable visualisation of $globals var in debug
  64.          */
  65.         self::$options['HTML_TABLE_show_globals'= false;   
  66.  
  67.         /** 
  68.          * Enable or disable search in debug 
  69.          */ 
  70.         self::$options['HTML_TABLE_enable_search'= true; 
  71.  
  72.         /** 
  73.          * Enable or disable view of super arrays 
  74.          */
  75.         self::$options['HTML_TABLE_show_super_array'= true;
  76.  
  77.         /** 
  78.          * Enable or disable the use of $_REQUEST array instead of 
  79.          * $_POST + _$GET + $_COOKIE + $_FILES
  80.          */
  81.         self::$options['HTML_TABLE_use_request_arr'= false;  
  82.  
  83.         /** 
  84.          * View Source script path
  85.          */
  86.         self::$options['HTML_TABLE_view_source_script_path''.';  
  87.         
  88.         /** 
  89.          * View source script file name
  90.          */     
  91.         self::$options['HTML_TABLE_view_source_script_name''PHP_Debug_ShowSource.php'
  92.  
  93.         /** 
  94.          * css path
  95.          */     
  96.         self::$options['HTML_TABLE_css_path''css'
  97.  
  98.         /** 
  99.          * Tabsize for view source script
  100.          */     
  101.         self::$options['HTML_TABLE_view_source_tabsize'= 4; 
  102.  
  103.         /** 
  104.          * Tabsize for view source script
  105.          */     
  106.         self::$options['HTML_TABLE_view_source_numbers'= 2; //HL_NUMBERS_TABLE 
  107.  
  108.        /** 
  109.         * Define wether the display must be forced for the debug type when
  110.         * in search mode
  111.         */
  112.         self::$options['HTML_TABLE_search_forced_type'= array
  113.             PHP_DebugLine::TYPE_STD         => false
  114.             PHP_DebugLine::TYPE_QUERY       => false
  115.             PHP_DebugLine::TYPE_QUERYREL    => false,
  116.             PHP_DebugLine::TYPE_ENV         => false,
  117.             PHP_DebugLine::TYPE_APPERROR    => false,
  118.             PHP_DebugLine::TYPE_CREDITS     => false,
  119.             PHP_DebugLine::TYPE_SEARCH      => true,
  120.             PHP_DebugLine::TYPE_DUMP        => false,
  121.             PHP_DebugLine::TYPE_PROCESSPERF => false,
  122.             PHP_DebugLine::TYPE_TEMPLATES   => false,
  123.             PHP_DebugLine::TYPE_PAGEACTION  => false,
  124.             PHP_DebugLine::TYPE_SQLPARSE    => false,
  125.             PHP_DebugLine::TYPE_WATCH       => false,
  126.             PHP_DebugLine::TYPE_PHPERROR    => false
  127.         );    
  128.  
  129.         /**
  130.          * After this goes all HTML related variables
  131.          * 
  132.          * 
  133.          * HTML code for header 
  134.          */         
  135.          self::$options['HTML_TABLE_header''
  136. <div id="pd-div">
  137. <br />
  138. <a name="pd-anchor" id="pd-anchor" />
  139. <table class="pd-table" cellspacing="0" cellpadding="0" width="100%">
  140.   <tr>
  141.     <td class="pd-table-header" align="center">File</td>
  142.     <td class="pd-table-header" align="center">Line</td>
  143.     <td class="pd-table-header" align="center">Inside/From function</td>
  144.     <td class="pd-table-header" align="center">Inside/From Class</td>  
  145.     <td class="pd-table-header" align="center">Type</td>  
  146.     <td class="pd-table-header" align="center">Debug information</td>
  147.     <td class="pd-table-header" align="center">Execution time (sec)</td>
  148.   </tr>
  149.         ';
  150.  
  151.         /**
  152.          * HTML code for footer 
  153.          */         
  154.          self::$options['HTML_TABLE_credits''
  155.         PHP_Debug ['. PHP_Debug::PEAR_RELEASE .'] | By COil (2007) | 
  156.         <a href="http://www.coilblog.com">http://www.coilblog.com</a> | 
  157.         <a href="http://phpdebug.sourceforge.net/">PHP_Debug Project Home</a> 
  158.         ';
  159.  
  160.         /**
  161.          * HTML code for a basic header 
  162.          */         
  163.          self::$options['HTML_TABLE_simple_header''<?xml version="1.0" encoding="UTF-8"?>
  164. <!DOCTYPE html 
  165.      PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  166.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  167. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  168.   <head>
  169.     <title>Pear::PHP_Debug</title>
  170. ';
  171.  
  172.         /**
  173.          * HTML code for a basic footer 
  174.          */         
  175.          self::$options['HTML_TABLE_simple_footer''
  176. </body>
  177. </html>
  178. ';
  179.  
  180.         /**
  181.          * HTML pre-row code for debug column file 
  182.          */         
  183.          self::$options['HTML_TABLE_prerow''
  184.   <tr>';
  185.  
  186.         /**
  187.          * HTML pre-row code for debug column file 
  188.          */         
  189.          self::$options['HTML_TABLE_interrow_file''
  190.     <td class="pd-td" align="center">';
  191.  
  192.         /**
  193.          * HTML post-row code for debug column line (centered)
  194.          */         
  195.         self::$options['HTML_TABLE_interrow_line''
  196.     </td>
  197.     <td class="pd-td" align="center">';
  198.  
  199.         self::$options['HTML_TABLE_interrow_function'= self::$options['HTML_TABLE_interrow_line']
  200.         self::$options['HTML_TABLE_interrow_class']    = self::$options['HTML_TABLE_interrow_line']
  201.         self::$options['HTML_TABLE_interrow_type']     = self::$options['HTML_TABLE_interrow_line']
  202.         self::$options['HTML_TABLE_interrow_time']     = self::$options['HTML_TABLE_interrow_line']
  203.  
  204.         /**
  205.          * HTML pre-row code for debug column info
  206.          */         
  207.         self::$options['HTML_TABLE_interrow_info''
  208.     </td>
  209.     <td class="pd-td" align="left">';
  210.  
  211.  
  212.         /**
  213.          * HTML post-row code for debugline 
  214.          */         
  215.          self::$options['HTML_TABLE_postrow''
  216.     </td>
  217.   </tr>
  218. ';
  219.  
  220.         /**
  221.          * HTML code for footer 
  222.          */         
  223.          self::$options['HTML_TABLE_footer''
  224. </table>
  225. </div>
  226. ';
  227.  
  228.     }
  229.  
  230.     /**
  231.      * returns the static instance of the class
  232.      *
  233.      * @since V2.0.0 - 11 apr 2006
  234.      * @see PHP_Debug
  235.      */
  236.     public static function singleton()
  237.     {
  238.         if (!isset(self::$instance)) {
  239.             $class = __CLASS__;
  240.             self::$instance = new $class;
  241.         }
  242.         return self::$instance;
  243.     }
  244.     
  245.     /**
  246.      * returns the configuration
  247.      *
  248.      * @since V2.0.0 - 07 apr 2006
  249.      * @see PHP_Debug
  250.      */
  251.     public static function getConfig()
  252.     {
  253.         return self::$options;
  254.     }
  255.     
  256.     /**
  257.      * HTML_Table_Config
  258.      * 
  259.      * @since V2.0.0 - 26 Apr 2006
  260.      */
  261.     public function __toString()
  262.     {
  263.         return '<pre>'. PHP_Debug::dumpVar(
  264.             $this->singleton()->getConfig()
  265.             __CLASS__
  266.             false,
  267.             PHP_DEBUG_DUMP_ARR_STR)'</pre>';
  268.     }   
  269. }

Documentation generated on Mon, 11 Mar 2019 15:28:40 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.