adding some strings
[moodle-linuxchix.git] / lib / pear / HTML / QuickForm / Renderer.php
blob7162c641bb9f33d20e68c9c68eec2e346f48ac9c
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4: */
3 // +----------------------------------------------------------------------+
4 // | PHP version 4.0 |
5 // +----------------------------------------------------------------------+
6 // | Copyright (c) 1997-2003 The PHP Group |
7 // +----------------------------------------------------------------------+
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 |
10 // | available at through the world-wide-web at |
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 |
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 // | Author: Alexey Borzov <borz_off@cs.msu.su> |
17 // +----------------------------------------------------------------------+
19 // $Id$
21 /**
22 * An abstract base class for QuickForm renderers
24 * The class implements a Visitor design pattern
26 * @abstract
27 * @author Alexey Borzov <borz_off@cs.msu.su>
29 class HTML_QuickForm_Renderer
31 /**
32 * Constructor
34 * @access public
36 function HTML_QuickForm_Renderer()
38 } // end constructor
40 /**
41 * Called when visiting a form, before processing any form elements
43 * @param object An HTML_QuickForm object being visited
44 * @access public
45 * @return void
46 * @abstract
48 function startForm(&$form)
50 return;
51 } // end func startForm
53 /**
54 * Called when visiting a form, after processing all form elements
56 * @param object An HTML_QuickForm object being visited
57 * @access public
58 * @return void
59 * @abstract
61 function finishForm(&$form)
63 return;
64 } // end func finishForm
66 /**
67 * Called when visiting a header element
69 * @param object An HTML_QuickForm_header element being visited
70 * @access public
71 * @return void
72 * @abstract
74 function renderHeader(&$header)
76 return;
77 } // end func renderHeader
79 /**
80 * Called when visiting an element
82 * @param object An HTML_QuickForm_element object being visited
83 * @param bool Whether an element is required
84 * @param string An error message associated with an element
85 * @access public
86 * @return void
87 * @abstract
89 function renderElement(&$element, $required, $error)
91 return;
92 } // end func renderElement
94 /**
95 * Called when visiting a hidden element
97 * @param object An HTML_QuickForm_hidden object being visited
98 * @access public
99 * @return void
100 * @abstract
102 function renderHidden(&$element)
104 return;
105 } // end func renderHidden
108 * Called when visiting a raw HTML/text pseudo-element
110 * Seems that this should not be used when using a template-based renderer
112 * @param object An HTML_QuickForm_html element being visited
113 * @access public
114 * @return void
115 * @abstract
117 function renderHtml(&$data)
119 return;
120 } // end func renderHtml
123 * Called when visiting a group, before processing any group elements
125 * @param object An HTML_QuickForm_group object being visited
126 * @param bool Whether a group is required
127 * @param string An error message associated with a group
128 * @access public
129 * @return void
130 * @abstract
132 function startGroup(&$group, $required, $error)
134 return;
135 } // end func startGroup
138 * Called when visiting a group, after processing all group elements
140 * @param object An HTML_QuickForm_group object being visited
141 * @access public
142 * @return void
143 * @abstract
145 function finishGroup(&$group)
147 return;
148 } // end func finishGroup
149 } // end class HTML_QuickForm_Renderer