/zf/library/Zend/Form/Decorator/Interface.php
PHP | 123 lines | 15 code | 11 blank | 97 comment | 0 complexity | 750ee8fdb42837ff0644c4ffe980fa7d MD5 | raw file
Possible License(s): MIT, BSD-3-Clause, Apache-2.0, LGPL-2.1, LGPL-3.0, BSD-2-Clause
1<?php 2/** 3 * Zend 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 * It is also available through the world-wide-web at this URL: 10 * http://framework.zend.com/license/new-bsd 11 * If you did not receive a copy of the license and are unable to 12 * obtain it through the world-wide-web, please send an email 13 * to license@zend.com so we can send you a copy immediately. 14 * 15 * @category Zend 16 * @package Zend_Form 17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) 18 * @license http://framework.zend.com/license/new-bsd New BSD License 19 */ 20 21/** 22 * Zend_Form_Decorator_Interface 23 * 24 * @category Zend 25 * @package Zend_Form 26 * @subpackage Decorator 27 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) 28 * @license http://framework.zend.com/license/new-bsd New BSD License 29 * @version $Id: Interface.php 23775 2011-03-01 17:25:24Z ralph $ 30 */ 31interface Zend_Form_Decorator_Interface 32{ 33 /** 34 * Constructor 35 * 36 * Accept options during initialization. 37 * 38 * @param array|Zend_Config $options 39 * @return void 40 */ 41 public function __construct($options = null); 42 43 /** 44 * Set an element to decorate 45 * 46 * While the name is "setElement", a form decorator could decorate either 47 * an element or a form object. 48 * 49 * @param mixed $element 50 * @return Zend_Form_Decorator_Interface 51 */ 52 public function setElement($element); 53 54 /** 55 * Retrieve current element 56 * 57 * @return mixed 58 */ 59 public function getElement(); 60 61 /** 62 * Set decorator options from an array 63 * 64 * @param array $options 65 * @return Zend_Form_Decorator_Interface 66 */ 67 public function setOptions(array $options); 68 69 /** 70 * Set decorator options from a config object 71 * 72 * @param Zend_Config $config 73 * @return Zend_Form_Decorator_Interface 74 */ 75 public function setConfig(Zend_Config $config); 76 77 /** 78 * Set a single option 79 * 80 * @param string $key 81 * @param mixed $value 82 * @return Zend_Form_Decorator_Interface 83 */ 84 public function setOption($key, $value); 85 86 /** 87 * Retrieve a single option 88 * 89 * @param string $key 90 * @return mixed 91 */ 92 public function getOption($key); 93 94 /** 95 * Retrieve decorator options 96 * 97 * @return array 98 */ 99 public function getOptions(); 100 101 /** 102 * Delete a single option 103 * 104 * @param string $key 105 * @return bool 106 */ 107 public function removeOption($key); 108 109 /** 110 * Clear all options 111 * 112 * @return Zend_Form_Decorator_Interface 113 */ 114 public function clearOptions(); 115 116 /** 117 * Render the element 118 * 119 * @param string $content Content to decorate 120 * @return string 121 */ 122 public function render($content); 123}