| | 256 | // {{{ getElement() |
|---|
| | 257 | |
|---|
| | 258 | /** |
|---|
| | 259 | * Gets a particular element by name |
|---|
| | 260 | * |
|---|
| | 261 | * @since 2.4 |
|---|
| | 262 | * @access public |
|---|
| | 263 | * @return array |
|---|
| | 264 | */ |
|---|
| | 265 | function &getElement($name) |
|---|
| | 266 | { |
|---|
| | 267 | $this->_createElementsIfNotExist(); |
|---|
| | 268 | foreach (array_keys($this->_elements) as $key) { |
|---|
| | 269 | if (isset($this->_elements[$key]->_attributes['name']) && ($this->_elements[$key]->_attributes['name'] == $name)) { |
|---|
| | 270 | return $this->_elements[$key]; |
|---|
| | 271 | } |
|---|
| | 272 | } |
|---|
| | 273 | return false; |
|---|
| | 274 | } // end func getElements |
|---|
| | 275 | |
|---|
| | 276 | // }}} |
|---|