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

Source for file Renderer.php

Documentation is available at Renderer.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | PHP version 4                                                        |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2004 The PHP Group                                |
  7. // +----------------------------------------------------------------------+
  8. // | This source file is subject to version 3.0 of the PHP license,       |
  9. // | that is bundled with this package in the file LICENSE, and is        |
  10. // | available through the world-wide-web at the following url:           |
  11. // | http://www.php.net/license/3_0.txt.                                  |
  12. // | If you did not receive a copy of the PHP license and are unable to   |
  13. // | obtain it through the world-wide-web, please send a note to          |
  14. // | license@php.net so we can mail you a copy immediately.               |
  15. // +----------------------------------------------------------------------+
  16. // | Authors: Frederic Poeydomenge <frederic.poeydomenge@free.fr>         |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id:
  20.  
  21. require_once 'PEAR.php';
  22. require_once 'Var_Dump/Renderer/Common.php';
  23.  
  24. /**
  25.  * A loader class for the renderers.
  26.  *
  27.  * @package Var_Dump
  28.  * @category PHP
  29.  * @author Frederic Poeydomenge <frederic.poeydomenge@free.fr>
  30.  */
  31.  
  32. {
  33.  
  34.     // {{{ factory()
  35.     /**
  36.      * Attempt to return a concrete Var_Dump_Renderer instance.
  37.      * @param string $mode    Name of the renderer.
  38.      * @param array  $options Parameters for the rendering.
  39.      * @access public
  40.      */
  41.     function factory($mode$options)
  42.     {
  43.         @include_once 'Var_Dump/Renderer/' $mode '.php';
  44.         $className 'Var_Dump_Renderer_' $mode;
  45.         if (class_exists($className)) {
  46.             $obj new $className($options);
  47.         else {
  48.             return PEAR::raiseError('Var_Dump: renderer "' $mode '" not found'TRUE);
  49.         }
  50.         return $obj;
  51.     }
  52.     // }}}
  53.  
  54. }
  55.  
  56. ?>

Documentation generated on Mon, 11 Mar 2019 10:16:31 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.