1
0
mirror of synced 2025-01-31 04:21:44 +03:00
This commit is contained in:
doctrine 2006-05-29 09:17:52 +00:00
parent 067fe93cef
commit 5d67e0aaed
2 changed files with 29 additions and 0 deletions

6
classes/Null.class.php Normal file
View File

@ -0,0 +1,6 @@
<?php
/**
* Doctrine_Null
*/
class Doctrine_Null { }
?>

View File

@ -0,0 +1,23 @@
<?php
class Doctrine_Validator_Enum {
/**
* @param Doctrine_Record $record
* @param string $key
* @param mixed $value
* @param string $args
* @return boolean
*/
public function validate(Doctrine_Record $record, $key, $value, $args) {
$max = substr_count($args, "-");
$int = (int) $value;
if($int != $value)
return false;
if($int < 0 || $int > $max)
return false;
return true;
}
}
?>