. */ /** * Defines the interface a form field should implement */ interface IFormField { /** * Get the name of the field * * @return String the name of the field */ public function getName(); /** * Get the title (header) of the field * * @return String the title of the field */ public function getTitle(); /** * Get the body part of the field (HTML element) * * @return String the body part of the field */ public function getField(); /** * Get the value of the field * * @return String the value of the field */ public function getValue(); /** * Set the value of the field * * @param String value of the field */ public function setValue($value); /** * Read the value from user input ($_POST variable) * * @return string input value from user input */ public function getInputValue(); /** * Is the field readonly? * * @return boolean true if the field is readonly, false otherwise */ public function isReadonly(); /** * Set if the field is readonly * * @param boolean if the field is readonly */ public function setReadonly($readonly); /** * Is the field compulsory? * * @return boolean true if the field is compulsory, false otherwise */ public function isCompulsory(); /** * Set if the field is compulsory * * @param boolean if the field is compulsory */ public function setCompulsory($compulsory); /** * Set the class (class attribute of html tag) * * @param string class to be add in the field */ public function setClass($class); /** * Get the class (class attribute of the html tag) * * @return string class */ public function getClass(); /** * Set the explanation (text under field of class 'explain') * * @param string explanation text */ public function setExplanation($explanation); /** * Get the explanation (text under field of class 'explain') * * @return string explanation */ public function getExplanation(); }