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

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