Changed ValidatorUSState to conform to the standard Doctrine_Validator_* naming scheme and removed the old style from Doctrine_Validator
This commit is contained in:
parent
89e1215296
commit
8edafac8e4
@ -107,10 +107,10 @@ class Doctrine_Validator {
|
||||
$class = "Doctrine_Validator_".ucwords(strtolower($name));
|
||||
if(class_exists($class)) {
|
||||
self::$validators[$name] = new $class;
|
||||
} elseif(class_exists($name."Validator")) {
|
||||
self::$validators[$name] = new $name."Validator";
|
||||
} else
|
||||
throw new Doctrine_Exception("Validator named '$name' not availible.");
|
||||
} else {
|
||||
throw new Doctrine_Exception("Validator named '$name' not availible.");
|
||||
}
|
||||
|
||||
}
|
||||
return self::$validators[$name];
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class ValidatorUSState {
|
||||
class Doctrine_Validator_Usstate {
|
||||
private static $states = array (
|
||||
"AK" => true,
|
||||
"AL" => true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user