예제 #1
0
파일: Boolean.php 프로젝트: addiks/phpsql
 public function validate($value)
 {
     parent::validate($value);
     if (!is_bool($value)) {
         throw new ErrorException("Value has to be boolean!");
     }
 }
예제 #2
0
파일: Number.php 프로젝트: addiks/phpsql
 public function validate($value)
 {
     parent::validate($value);
     if (!is_numeric($value)) {
         throw new ErrorException("Value has to be numeric!");
     }
 }
예제 #3
0
파일: Text.php 프로젝트: addiks/phpsql
 /**
  * Check for datatype string.
  * @param string $value
  * @throws  Exception\Error
  */
 protected function validate($value)
 {
     parent::validate($value);
     if (!is_string($value)) {
         throw new ErrorException("Value has to be text!");
     }
 }