Subversion Repositories Applications.papyrus

Rev

Rev 320 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 320 Rev 443
1
<?php
1
<?php
2
/* vim: set expandtab tabstop=4 shiftwidth=4: */
2
/* vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +----------------------------------------------------------------------+
3
// +----------------------------------------------------------------------+
4
// | PHP version 4.0                                                      |
4
// | PHP version 4.0                                                      |
5
// +----------------------------------------------------------------------+
5
// +----------------------------------------------------------------------+
6
// | Copyright (c) 1997-2003 The PHP Group                                |
6
// | Copyright (c) 1997-2003 The PHP Group                                |
7
// +----------------------------------------------------------------------+
7
// +----------------------------------------------------------------------+
8
// | This source file is subject to version 2.0 of the PHP license,       |
8
// | This source file is subject to version 2.0 of the PHP license,       |
9
// | that is bundled with this package in the file LICENSE, and is        |
9
// | that is bundled with this package in the file LICENSE, and is        |
10
// | available at through the world-wide-web at                           |
10
// | available at through the world-wide-web at                           |
11
// | http://www.php.net/license/2_02.txt.                                 |
11
// | http://www.php.net/license/2_02.txt.                                 |
12
// | If you did not receive a copy of the PHP license and are unable to   |
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          |
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.               |
14
// | license@php.net so we can mail you a copy immediately.               |
15
// +----------------------------------------------------------------------+
15
// +----------------------------------------------------------------------+
16
// | Author: Alexey Borzov <borz_off@cs.msu.su>                           |
16
// | Author: Alexey Borzov <borz_off@cs.msu.su>                           |
17
// +----------------------------------------------------------------------+
17
// +----------------------------------------------------------------------+
18
//
18
//
19
// $Id: Renderer.php,v 1.1 2005-03-30 08:50:33 jpm Exp $
19
// $Id: Renderer.php,v 1.2 2005-09-20 17:01:22 ddelon Exp $
20
 
20
 
21
/**
21
/**
22
 * An abstract base class for QuickForm renderers
22
 * An abstract base class for QuickForm renderers
23
 * 
23
 * 
24
 * The class implements a Visitor design pattern
24
 * The class implements a Visitor design pattern
25
 *
25
 *
26
 * @abstract
26
 * @abstract
27
 * @author Alexey Borzov <borz_off@cs.msu.su>
27
 * @author Alexey Borzov <borz_off@cs.msu.su>
28
 */
28
 */
29
class HTML_QuickForm_Renderer
29
class HTML_QuickForm_Renderer
30
{
30
{
31
   /**
31
   /**
32
    * Constructor
32
    * Constructor
33
    *
33
    *
34
    * @access public
34
    * @access public
35
    */
35
    */
36
    function HTML_QuickForm_Renderer()
36
    function HTML_QuickForm_Renderer()
37
    {
37
    {
38
    } // end constructor
38
    } // end constructor
39
 
39
 
40
   /**
40
   /**
41
    * Called when visiting a form, before processing any form elements
41
    * Called when visiting a form, before processing any form elements
42
    *
42
    *
43
    * @param    object    An HTML_QuickForm object being visited
43
    * @param    object    An HTML_QuickForm object being visited
44
    * @access   public
44
    * @access   public
45
    * @return   void 
45
    * @return   void 
46
    * @abstract
46
    * @abstract
47
    */
47
    */
48
    function startForm(&$form)
48
    function startForm(&$form)
49
    {
49
    {
50
        return;
50
        return;
51
    } // end func startForm
51
    } // end func startForm
52
 
52
 
53
   /**
53
   /**
54
    * Called when visiting a form, after processing all form elements
54
    * Called when visiting a form, after processing all form elements
55
    * 
55
    * 
56
    * @param    object     An HTML_QuickForm object being visited
56
    * @param    object     An HTML_QuickForm object being visited
57
    * @access   public
57
    * @access   public
58
    * @return   void 
58
    * @return   void 
59
    * @abstract
59
    * @abstract
60
    */
60
    */
61
    function finishForm(&$form)
61
    function finishForm(&$form)
62
    {
62
    {
63
        return;
63
        return;
64
    } // end func finishForm
64
    } // end func finishForm
65
 
65
 
66
   /**
66
   /**
67
    * Called when visiting a header element
67
    * Called when visiting a header element
68
    *
68
    *
69
    * @param    object     An HTML_QuickForm_header element being visited
69
    * @param    object     An HTML_QuickForm_header element being visited
70
    * @access   public
70
    * @access   public
71
    * @return   void 
71
    * @return   void 
72
    * @abstract
72
    * @abstract
73
    */
73
    */
74
    function renderHeader(&$header)
74
    function renderHeader(&$header)
75
    {
75
    {
76
        return;
76
        return;
77
    } // end func renderHeader
77
    } // end func renderHeader
78
 
78
 
79
   /**
79
   /**
80
    * Called when visiting an element
80
    * Called when visiting an element
81
    *
81
    *
82
    * @param    object     An HTML_QuickForm_element object being visited
82
    * @param    object     An HTML_QuickForm_element object being visited
83
    * @param    bool       Whether an element is required
83
    * @param    bool       Whether an element is required
84
    * @param    string     An error message associated with an element
84
    * @param    string     An error message associated with an element
85
    * @access   public
85
    * @access   public
86
    * @return   void 
86
    * @return   void 
87
    * @abstract
87
    * @abstract
88
    */
88
    */
89
    function renderElement(&$element, $required, $error)
89
    function renderElement(&$element, $required, $error)
90
    {
90
    {
91
        return;
91
        return;
92
    } // end func renderElement
92
    } // end func renderElement
93
 
93
 
94
   /**
94
   /**
95
    * Called when visiting a hidden element
95
    * Called when visiting a hidden element
96
    * 
96
    * 
97
    * @param    object     An HTML_QuickForm_hidden object being visited
97
    * @param    object     An HTML_QuickForm_hidden object being visited
98
    * @access   public
98
    * @access   public
99
    * @return   void
99
    * @return   void
100
    * @abstract 
100
    * @abstract 
101
    */
101
    */
102
    function renderHidden(&$element)
102
    function renderHidden(&$element)
103
    {
103
    {
104
        return;
104
        return;
105
    } // end func renderHidden
105
    } // end func renderHidden
106
 
106
 
107
   /**
107
   /**
108
    * Called when visiting a raw HTML/text pseudo-element
108
    * Called when visiting a raw HTML/text pseudo-element
109
    * 
109
    * 
110
    * Seems that this should not be used when using a template-based renderer
110
    * Seems that this should not be used when using a template-based renderer
111
    *
111
    *
112
    * @param    object     An HTML_QuickForm_html element being visited
112
    * @param    object     An HTML_QuickForm_html element being visited
113
    * @access   public
113
    * @access   public
114
    * @return   void 
114
    * @return   void 
115
    * @abstract
115
    * @abstract
116
    */
116
    */
117
    function renderHtml(&$data)
117
    function renderHtml(&$data)
118
    {
118
    {
119
        return;
119
        return;
120
    } // end func renderHtml
120
    } // end func renderHtml
121
 
121
 
122
   /**
122
   /**
123
    * Called when visiting a group, before processing any group elements
123
    * Called when visiting a group, before processing any group elements
124
    *
124
    *
125
    * @param    object     An HTML_QuickForm_group object being visited
125
    * @param    object     An HTML_QuickForm_group object being visited
126
    * @param    bool       Whether a group is required
126
    * @param    bool       Whether a group is required
127
    * @param    string     An error message associated with a group
127
    * @param    string     An error message associated with a group
128
    * @access   public
128
    * @access   public
129
    * @return   void 
129
    * @return   void 
130
    * @abstract
130
    * @abstract
131
    */
131
    */
132
    function startGroup(&$group, $required, $error)
132
    function startGroup(&$group, $required, $error)
133
    {
133
    {
134
        return;
134
        return;
135
    } // end func startGroup
135
    } // end func startGroup
136
 
136
 
137
   /**
137
   /**
138
    * Called when visiting a group, after processing all group elements
138
    * Called when visiting a group, after processing all group elements
139
    *
139
    *
140
    * @param    object     An HTML_QuickForm_group object being visited
140
    * @param    object     An HTML_QuickForm_group object being visited
141
    * @access   public
141
    * @access   public
142
    * @return   void 
142
    * @return   void 
143
    * @abstract
143
    * @abstract
144
    */
144
    */
145
    function finishGroup(&$group)
145
    function finishGroup(&$group)
146
    {
146
    {
147
        return;
147
        return;
148
    } // end func finishGroup
148
    } // end func finishGroup
149
} // end class HTML_QuickForm_Renderer
149
} // end class HTML_QuickForm_Renderer
150
?>
150
?>