1: <?php
2: /**
3: * Pry Framework
4: *
5: * LICENSE
6: *
7: * This source file is subject to the new BSD license that is bundled
8: * with this package in the file LICENSE.txt.
9: *
10: * @version $Revision: 276 $
11: */
12:
13: /**
14: * Element Hidden
15: * @category Pry
16: * @package Form
17: * @subpackage Form_Element
18: * @version 1.0.0
19: * @author Olivier ROGER <oroger.fr>
20: *
21: */
22: class Form_Element_Hidden extends Form_Input
23: {
24: /**
25: * Constructeur
26: *
27: * @param string $nom
28: * @param Form_Form $form
29: * @access public
30: */
31: public function __construct($nom,$form)
32: {
33: parent::__construct($nom,$form);
34: if(!isset($this->attrs['type']))
35: $this->attrs['type'] = 'hidden';
36: }
37:
38: /**
39: * Ecriture de l'objet
40: *
41: * @access public
42: * @return string
43: */
44: public function __toString()
45: {
46: $attributs = $this->attrsToString();
47: return "\t".'<input '.$attributs.' value="'.htmlspecialchars($this->value).'" />'."\n";
48: }
49: }
50: ?>