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 <fpoeydomenge at free dot fr>          |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id$
  20.  
  21. require_once 'Var_Dump/Renderer/Common.php';
  22.  
  23. /**
  24.  * A loader class for the renderers.
  25.  *
  26.  * @package Var_Dump
  27.  * @category PHP
  28.  * @author Frederic Poeydomenge <fpoeydomenge at free dot fr>
  29.  */
  30.  
  31. {
  32.  
  33.     /**
  34.      * Attempt to return a concrete Var_Dump_Renderer instance.
  35.      *
  36.      * @param string $mode Name of the renderer.
  37.      * @param array $options Parameters for the rendering.
  38.      * @access public
  39.      */
  40.     function factory($mode$options)
  41.     {
  42.         @include_once 'Var_Dump/Renderer/' $mode '.php';
  43.         $className 'Var_Dump_Renderer_' $mode;
  44.         if (class_exists($className)) {
  45.             $obj new $className($options);
  46.         else {
  47.             include_once 'PEAR.php';
  48.             PEAR::raiseError('Var_Dump: renderer "' $mode '" not found'TRUE);
  49.             return NULL;
  50.         }
  51.         return $obj;
  52.     }
  53.  
  54. }
  55.  
  56. ?>

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