/Nette/Forms/IFormControl.php
PHP | 77 lines | 11 code | 13 blank | 53 comment | 0 complexity | fc5f1da8631f0ae5fb6b01d413bb7ca6 MD5 | raw file
Possible License(s): BSD-3-Clause
- <?php
- /**
- * Nette Framework
- *
- * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- *
- * This source file is subject to the "Nette license" that is bundled
- * with this package in the file license.txt.
- *
- * For more information please see http://nettephp.com
- *
- * @copyright Copyright (c) 2004, 2009 David Grudl
- * @license http://nettephp.com/license Nette license
- * @link http://nettephp.com
- * @category Nette
- * @package Nette\Forms
- */
- /*namespace Nette\Forms;*/
- /**
- * Defines method that must be implemented to allow a component to act like a form control.
- *
- * @author David Grudl
- * @copyright Copyright (c) 2004, 2009 David Grudl
- * @package Nette\Forms
- */
- interface IFormControl
- {
- /**
- * Loads HTTP data.
- * @return void
- */
- function loadHttpData();
- /**
- * Sets control's value.
- * @param mixed
- * @return void
- */
- function setValue($value);
- /**
- * Returns control's value.
- * @return mixed
- */
- function getValue();
- /**
- * @return Rules
- */
- function getRules();
- /**
- * Returns errors corresponding to control.
- * @return array
- */
- function getErrors();
- /**
- * Is control disabled?
- * @return bool
- */
- function isDisabled();
- /**
- * Returns translated string.
- * @param string
- * @return string
- */
- function translate($s);
- }