Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Form / ElementInterface.php
blob597f35601a463ff555feae501f67494eb62cc04b
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Form;
12 interface ElementInterface
14 /**
15 * Set the name of this element
17 * In most cases, this will proxy to the attributes for storage, but is
18 * present to indicate that elements are generally named.
20 * @param string $name
21 * @return ElementInterface
23 public function setName($name);
25 /**
26 * Retrieve the element name
28 * @return string
30 public function getName();
32 /**
33 * Set options for an element
35 * @param array|\Traversable $options
36 * @return ElementInterface
38 public function setOptions($options);
40 /**
41 * get the defined options
43 * @return array
45 public function getOptions();
47 /**
48 * return the specified option
50 * @param string $option
51 * @return null|mixed
53 public function getOption($option);
55 /**
56 * Set a single element attribute
58 * @param string $key
59 * @param mixed $value
60 * @return ElementInterface
62 public function setAttribute($key, $value);
64 /**
65 * Retrieve a single element attribute
67 * @param string $key
68 * @return mixed
70 public function getAttribute($key);
72 /**
73 * Return true if a specific attribute is set
75 * @param string $key
76 * @return bool
78 public function hasAttribute($key);
80 /**
81 * Set many attributes at once
83 * Implementation will decide if this will overwrite or merge.
85 * @param array|\Traversable $arrayOrTraversable
86 * @return ElementInterface
88 public function setAttributes($arrayOrTraversable);
90 /**
91 * Retrieve all attributes at once
93 * @return array|\Traversable
95 public function getAttributes();
97 /**
98 * Set the value of the element
100 * @param mixed $value
101 * @return ElementInterface
103 public function setValue($value);
106 * Retrieve the element value
108 * @return mixed
110 public function getValue();
113 * Set the label (if any) used for this element
115 * @param $label
116 * @return ElementInterface
118 public function setLabel($label);
121 * Retrieve the label (if any) used for this element
123 * @return string
125 public function getLabel();
128 * Set a list of messages to report when validation fails
130 * @param array|\Traversable $messages
131 * @return ElementInterface
133 public function setMessages($messages);
136 * Get validation error messages, if any
138 * Returns a list of validation failure messages, if any.
140 * @return array|\Traversable
142 public function getMessages();