Ejemplo n.º 1
0
 /**
 	Attachs a value to the validator.
 
 	$mValue must be either a string, an integer, a float, an instance of Printable or an object castable to string.
 
 	@param	$mValue						The value to attach.
 	@return	$this						Used to chain methods.
 	@throw	DomainException				$mValue is not of a correct type.
 */
 public function setValue($mValue)
 {
     if (is_object($mValue)) {
         if ($mValue instanceof Printable) {
             $mValue = $mValue->toString();
         } elseif (method_exists($mValue, '__toString')) {
             $mValue = (string) $mValue;
         }
     }
     is_null($mValue) || is_string($mValue) || is_int($mValue) || is_float($mValue) or burn('DomainException', _WT('$mValue is not of a correct type.'));
     return parent::setValue($mValue);
 }
Ejemplo n.º 2
0
Archivo: form.php Proyecto: extend/wee
 public function validate()
 {
     parent::validate();
 }