1: <?php
2:
3: /**
4: * Pry Framework
5: *
6: * LICENSE
7: *
8: * This source file is subject to the new BSD license that is bundled
9: * with this package in the file LICENSE.txt.
10: *
11: */
12:
13: namespace Pry\Form;
14:
15: /**
16: *
17: * @category Pry
18: * @package Form
19: * @abstract
20: * @version 1.0.5
21: * @author Olivier ROGER <oroger.fr>
22: *
23: */
24: abstract class Input extends Field
25: {
26:
27: /**
28: * Constructeur.
29: *
30: * @param string $nom
31: * @param Form_Form $form
32: * @access protected
33: */
34: protected function __construct($nom, $form)
35: {
36: parent::__construct($nom, $form);
37: $this->attrs['name'] = $nom;
38: }
39:
40: /**
41: * Défini un attribut de l'élément
42: *
43: * @param string $nom
44: * @param string $valeur
45: */
46: public function setAttributes($nom, $valeur)
47: {
48: if (!isset($this->attrs[$nom]))
49: $this->attrs[$nom] = $valeur;
50: return $this;
51: }
52:
53: }
54:
55: ?>