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

Source for file HTML4_Table.php

Documentation is available at HTML4_Table.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 'Var_Dump/Renderer/Table.php';
  22.  
  23. /**
  24.  * A concrete renderer for Var_Dump
  25.  *
  26.  * Returns a table-based representation of a variable in HTML 4
  27.  * Extends the 'Table' renderer, with just a predefined set of options,
  28.  * that are empty by default. You can also directly call the 'Table' renderer
  29.  * with the corresponding configuration options.
  30.  *
  31.  * @package Var_Dump
  32.  * @category PHP
  33.  * @author Frederic Poeydomenge <frederic.poeydomenge@free.fr>
  34.  */
  35.  
  36. {
  37.  
  38.     // {{{ constructor
  39.     /**
  40.      * Class constructor.
  41.      * @param  array  $options Parameters for the rendering.
  42.      * @access public
  43.      */
  44.     function Var_Dump_Renderer_HTML4_Table($options = array())
  45.     {
  46.         // See Var_Dump/Renderer/Table.php for the complete list of options
  47.         $this->defaultOptions = array_merge(
  48.             $this->defaultOptions,
  49.             array(
  50.                 'before_num_key' => '<b>',
  51.                 'after_num_key'  => '</b>',
  52.                 'before_str_key' => '<b>',
  53.                 'after_str_key'  => '</b>',
  54.                 'before_type'    => '<font color="#000000">',
  55.                 'after_type'     => '</font>',
  56.                 'before_value'   => '<font color="#006600">',
  57.                 'after_value'    => '</font>',
  58.                 'start_table'    =>
  59.                     '<table border="0" cellpadding="1" cellspacing="0" bgcolor="black"><tr><td>' .
  60.                     '<table border="0" cellpadding="4" cellspacing="0">',
  61.                 'end_table'      => '</table></td></tr></table>',
  62.                 'start_tr'       => '<tr valign="top" bgcolor="#F8F8F8">',
  63.                 'start_tr_alt'   => '<tr valign="top" bgcolor="#E8E8E8">',
  64.                 'start_td_key'   => '<td bgcolor="#CCCCCC">',
  65.                 'start_caption'  => '<caption style="color:white;background:#339900;">'
  66.             )
  67.         );
  68.         parent::Var_Dump_Renderer($options);
  69.     }
  70.     // }}}
  71.  
  72. }
  73.  
  74. ?>

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