Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/* vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +----------------------------------------------------------------------+
4
// | PHP version 4                                                        |
5
// +----------------------------------------------------------------------+
6
// | Copyright (c) 1997-2006 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@free.fr>                 |
17
// +----------------------------------------------------------------------+
18
 
19
/**
20
 * Wrapper for the var_dump function.
21
 *
22
 * " The var_dump function displays structured information about expressions
23
 * that includes its type and value. Arrays are explored recursively
24
 * with values indented to show structure. "
25
 *
26
 * The Var_Dump class captures the output of the var_dump function,
27
 * by using output control functions, and then uses external renderer
28
 * classes for displaying the result in various graphical ways :
29
 * simple text, HTML/XHTML text, HTML/XHTML table, XML, ...
30
 *
31
 * @category  PHP
32
 * @package   Var_Dump
33
 * @author    Frederic Poeydomenge <fpoeydomenge@free.fr>
34
 * @copyright 1997-2006 The PHP Group
35
 * @license   http://www.php.net/license/3_0.txt PHP License 3.0
36
 * @version   CVS: $Id: XHTML_Text.php 233111 2007-04-02 09:38:10Z fredericpoeydome $
37
 * @link      http://pear.php.net/package/Var_Dump
38
 */
39
 
40
/**
41
 * Include Text Renderer class
42
 */
43
 
44
require_once 'Var_Dump/Renderer/Text.php';
45
 
46
/**
47
 * A concrete renderer for Var_Dump
48
 *
49
 * Returns a text representation of a variable in XHTML
50
 * Extends the 'Text' renderer, with just a predefined set of options,
51
 * that are empty by default. You can also directly call the 'Text' renderer
52
 * with the corresponding configuration options.
53
 *
54
 * @category  PHP
55
 * @package   Var_Dump
56
 * @author    Frederic Poeydomenge <fpoeydomenge@free.fr>
57
 * @copyright 1997-2006 The PHP Group
58
 * @license   http://www.php.net/license/3_0.txt PHP License 3.0
59
 * @version   CVS: $Id: XHTML_Text.php 233111 2007-04-02 09:38:10Z fredericpoeydome $
60
 * @link      http://pear.php.net/package/Var_Dump
61
 */
62
 
63
class Var_Dump_Renderer_XHTML_Text extends Var_Dump_Renderer_Text
64
{
65
 
66
    /**
67
     * Class constructor.
68
     *
69
     * @param array $options Parameters for the rendering.
70
     * @access public
71
     */
72
    function Var_Dump_Renderer_XHTML_Text($options = array())
73
    {
74
        // See Var_Dump/Renderer/Text.php for the complete list of options
75
        $this->defaultOptions = array_merge(
76
            $this->defaultOptions,
77
            array(
78
                'is_html'      => TRUE,
79
                'before_text'  => '<pre class="var_dump">',
80
                'after_text'   => '</pre>',
81
                'before_type'  => '<span class="type">',
82
                'after_type'   => '</span>',
83
                'before_value' => '<span class="value">',
84
                'after_value'  => '</span>'
85
            )
86
        );
87
        $this->setOptions($options);
88
    }
89
 
90
}
91
 
92
?>