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

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