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.  * @version    CVS: $Id: Renderer.php,v 1.1 2008/05/02 14:26:37 c0il Exp $
  16.  */
  17.  
  18. {
  19.  
  20.     /**
  21.      * Attempt to return a concrete Debug_Renderer instance.
  22.      *
  23.      * @param string $mode Name of the renderer.
  24.      * @param array $options Parameters for the rendering.
  25.      * @access public
  26.      */
  27.     public static function factory($debugObject$options)
  28.     {
  29.         $className 'PHP_Debug_Renderer_'$options['render_type']
  30.             '_'$options['render_mode'];
  31.         $classPath 'PHP/Debug/Renderer/'$options['render_type']
  32.             '/'$options['render_mode']'.php';
  33.  
  34.         include_once $classPath;
  35.  
  36.         if (class_exists($className)) {
  37.             $obj = new $className($debugObject$options);
  38.         else {
  39.             include_once 'PEAR.php';
  40.             PEAR::raiseError('PHP_Debug: renderer &gt;' 
  41.                 $options['DEBUG_render_mode''&lt; not found'true);
  42.             return NULL;
  43.         }
  44.         return $obj;
  45.     }
  46. }

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