home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2005 June / PCpro_2005_06.ISO / files / opensource / xamp / xampp-win32.exe / xampp / HTML4_Table.php < prev    next >
Encoding:
PHP Script  |  2004-10-01  |  3.1 KB  |  75 lines

  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. class Var_Dump_Renderer_HTML4_Table extends Var_Dump_Renderer_Table
  37. {
  38.  
  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"' .
  60.                     ' bgcolor="black"><tr><td>' .
  61.                     '<table border="0" cellpadding="4" cellspacing="0"' .
  62.                     ' width="100%">',
  63.                 'end_table'      => '</table></td></tr></table>',
  64.                 'start_tr'       => '<tr valign="top" bgcolor="#F8F8F8">',
  65.                 'start_tr_alt'   => '<tr valign="top" bgcolor="#E8E8E8">',
  66.                 'start_td_key'   => '<td bgcolor="#CCCCCC">',
  67.                 'start_caption'  => '<caption style="color:white;background:#339900;">'
  68.             )
  69.         );
  70.         $this->setOptions($options);
  71.     }
  72.  
  73. }
  74.  
  75. ?>