]> git.openstreetmap.org Git - chef.git/blob - cookbooks/dmca/files/default/html/HTML/QuickForm/text.php
Merge remote-tracking branch 'github/pull/183'
[chef.git] / cookbooks / dmca / files / default / html / HTML / QuickForm / text.php
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
4 /**
5  * HTML class for a text field
6  * 
7  * PHP versions 4 and 5
8  *
9  * LICENSE: This source file is subject to version 3.01 of the PHP license
10  * that is available through the world-wide-web at the following URI:
11  * http://www.php.net/license/3_01.txt If you did not receive a copy of
12  * the PHP License and are unable to obtain it through the web, please
13  * send a note to license@php.net so we can mail you a copy immediately.
14  *
15  * @category    HTML
16  * @package     HTML_QuickForm
17  * @author      Adam Daniel <adaniel1@eesus.jnj.com>
18  * @author      Bertrand Mansion <bmansion@mamasam.com>
19  * @copyright   2001-2011 The PHP Group
20  * @license     http://www.php.net/license/3_01.txt PHP License 3.01
21  * @version     CVS: $Id$
22  * @link        http://pear.php.net/package/HTML_QuickForm
23  */
24
25 /**
26  * Base class for <input /> form elements
27  */
28 require_once 'HTML/QuickForm/input.php';
29
30 /**
31  * HTML class for a text field
32  * 
33  * @category    HTML
34  * @package     HTML_QuickForm
35  * @author      Adam Daniel <adaniel1@eesus.jnj.com>
36  * @author      Bertrand Mansion <bmansion@mamasam.com>
37  * @version     Release: 3.2.16
38  * @since       1.0
39  */
40 class HTML_QuickForm_text extends HTML_QuickForm_input
41 {
42                 
43     // {{{ constructor
44
45     /**
46      * Class constructor
47      * 
48      * @param     string    $elementName    (optional)Input field name attribute
49      * @param     string    $elementLabel   (optional)Input field label
50      * @param     mixed     $attributes     (optional)Either a typical HTML attribute string 
51      *                                      or an associative array
52      * @since     1.0
53      * @access    public
54      * @return    void
55      */
56     function HTML_QuickForm_text($elementName=null, $elementLabel=null, $attributes=null)
57     {
58         HTML_QuickForm_input::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
59         $this->_persistantFreeze = true;
60         $this->setType('text');
61     } //end constructor
62         
63     // }}}
64     // {{{ setSize()
65
66     /**
67      * Sets size of text field
68      * 
69      * @param     string    $size  Size of text field
70      * @since     1.3
71      * @access    public
72      * @return    void
73      */
74     function setSize($size)
75     {
76         $this->updateAttributes(array('size'=>$size));
77     } //end func setSize
78
79     // }}}
80     // {{{ setMaxlength()
81
82     /**
83      * Sets maxlength of text field
84      * 
85      * @param     string    $maxlength  Maximum length of text field
86      * @since     1.3
87      * @access    public
88      * @return    void
89      */
90     function setMaxlength($maxlength)
91     {
92         $this->updateAttributes(array('maxlength'=>$maxlength));
93     } //end func setMaxlength
94
95     // }}}
96     
97 } //end class HTML_QuickForm_text
98 ?>