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

Source for file Common.php

Documentation is available at Common.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. /**
  22.  * A base class for Var_Dump renderers, must be inherited by all such.
  23.  *
  24.  * @package Var_Dump
  25.  * @category PHP
  26.  * @author Frederic Poeydomenge <frederic.poeydomenge@free.fr>
  27.  */
  28.  
  29. {
  30.  
  31.     /**
  32.      * Run-time configuration options.
  33.      * @var array 
  34.      * @access public
  35.      */
  36.     var $options = array();
  37.  
  38.     /**
  39.      * Default configuration options.
  40.      * See Var_Dump/Renderer/*.php for the complete list of options
  41.      * @var array 
  42.      * @access public
  43.      */
  44.     var $defaultOptions = array();
  45.  
  46.     /**
  47.      * Array containing the element family : start/finish group, start/finish element
  48.      * @var array 
  49.      * @access public
  50.      */
  51.     var $family;
  52.  
  53.     /**
  54.      * Array containing the element depths
  55.      * @var array 
  56.      * @access public
  57.      */
  58.     var $depth;
  59.  
  60.     /**
  61.      * Array containing the element types
  62.      * @var array 
  63.      * @access public
  64.      */
  65.     var $type;
  66.  
  67.     /**
  68.      * Array containing the element values
  69.      * @var array 
  70.      * @access public
  71.      */
  72.     var $value;
  73.  
  74.     /**
  75.      * Array containing the strlen of keys for all the nested arrays
  76.      * @var array 
  77.      * @access public
  78.      */
  79.     var $keyLen;
  80.  
  81.     // {{{ setOptions()
  82.     /**
  83.      * Set run-time configuration options for the renderer
  84.      * @param array $options Run-time configuration options.
  85.      * @access public
  86.      */
  87.     function setOptions($options = array())
  88.     {
  89.         $this->options = array_merge($this->defaultOptions$options);
  90.     }
  91.     // }}}
  92.  
  93.     // {{{ initialize()
  94.     /**
  95.      * Initialize internal data structures for the rendering.
  96.      * @param array $family Containing the element family.
  97.      * @param array $depth  Containing the element depths.
  98.      * @param array $type   Containing the element types.
  99.      * @param array $value  Containing the element values.
  100.      * @param array $keyLen Strlen of keys for all the nested arrays
  101.      * @access public
  102.      */
  103.     function initialize(&$family&$depth&$type&$value&$keyLen)
  104.     {
  105.         $this->family = $family;
  106.         $this->depth  = $depth;
  107.         $this->type   = $type;
  108.         $this->value  = $value;
  109.         $this->keyLen = $keyLen;
  110.     }
  111.     // }}}
  112.  
  113.     // {{{ toString()
  114.     /**
  115.      * Returns the string representation of a variable
  116.      * @return string The string representation of the variable.
  117.      * @access public
  118.      * @abstract
  119.      */
  120.     function toString()
  121.     {
  122.     }
  123.     // }}}
  124.  
  125. }
  126.  
  127. ?>

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