home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2005 June / PCpro_2005_06.ISO / files / opensource / xamp / xampp-win32.exe / xampp / XHTML_Text.php < prev    next >
Encoding:
PHP Script  |  2004-10-01  |  2.5 KB  |  64 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/Text.php';
  22.  
  23. /**
  24.  * A concrete renderer for Var_Dump
  25.  *
  26.  * Returns a text representation of a variable in XHTML
  27.  * Extends the 'Text' renderer, with just a predefined set of options,
  28.  * that are empty by default. You can also directly call the 'Text' 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_XHTML_Text extends Var_Dump_Renderer_Text
  37. {
  38.  
  39.     /**
  40.      * Class constructor.
  41.      * @param array $options Parameters for the rendering.
  42.      * @access public
  43.      */
  44.     function Var_Dump_Renderer_XHTML_Text($options = array())
  45.     {
  46.         // See Var_Dump/Renderer/Text.php for the complete list of options
  47.         $this->defaultOptions = array_merge(
  48.             $this->defaultOptions,
  49.             array(
  50.                 'is_html'      => TRUE,
  51.                 'before_text'  => '<pre class="var_dump">',
  52.                 'after_text'   => '</pre>',
  53.                 'before_type'  => '<span class="type">',
  54.                 'after_type'   => '</span>',
  55.                 'before_value' => '<span class="value">',
  56.                 'after_value'  => '</span>'
  57.             )
  58.         );
  59.         $this->setOptions($options);
  60.     }
  61.  
  62. }
  63.  
  64. ?>