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

Source for file Renderer.php

Documentation is available at Renderer.php

  1. <?php
  2.  
  3. require_once 'PHP/Debug/Renderer/Common.php';
  4.  
  5. /**
  6.  * A loader class for the renderers.
  7.  *
  8.  * @package PHP_Debug
  9.  * @category PHP
  10.  * @author Loic Vernet <qrf_coil at yahoo dot fr>
  11.  * @since V2.0.0 - 10 Apr 2006
  12.  * 
  13.  * @package PHP_Debug
  14.  * @filesource
  15.  */
  16.  
  17. {
  18.  
  19.     /**
  20.      * Attempt to return a concrete Debug_Renderer instance.
  21.      *
  22.      * @param string $mode Name of the renderer.
  23.      * @param array $options Parameters for the rendering.
  24.      * @access public
  25.      */
  26.     public static function factory($debugObject$options)
  27.     {
  28.         $className 'PHP_Debug_Renderer_'$options['render_type']
  29.             '_'$options['render_mode'];
  30.         $classPath 'PHP/Debug/Renderer/'$options['render_type']
  31.             '/'$options['render_mode']'.php';
  32.  
  33.         include_once $classPath;
  34.  
  35.         if (class_exists($className)) {
  36.             $obj = new $className($debugObject$options);
  37.         else {
  38.             include_once 'PEAR.php';
  39.             PEAR::raiseError('PHP_Debug: renderer &gt;' 
  40.                 $options['DEBUG_render_mode''&lt; not found'true);
  41.             return NULL;
  42.         }
  43.         return $obj;
  44.     }
  45. }

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