* @package tao */ abstract class tao_helpers_form_Validator extends Configurable implements ValidatorInterface { /** * Message to the user * * @access protected * @var string */ protected $message = null; // --- OPERATIONS --- /** * Short description of method getName * * @access public * @author Joel Bout, * @return string */ public function getName() { return (string) str_replace('tao_helpers_form_validators_', '', get_class($this)); } /** * Short description of method getMessage * * @access public * @author Joel Bout, * @return string */ public function getMessage() { return is_null($this->message) ? $this->getDefaultMessage() : $this->message; } /** * Short description of method getMessage * * @access public * @author Joel Bout, * @return string */ public function setMessage($message) { $this->message = $message; } /** * @return string */ protected function getDefaultMessage() { return __(''); } /** * Short description of method evaluate * * @abstract * @access public * @author Joel Bout, * @param values * @return boolean */ abstract public function evaluate($values); }