1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Changed ValidatorUSState to conform to the standard Doctrine_Validator_* naming scheme and removed the old style from Doctrine_Validator

This commit is contained in:
elliot 2006-09-20 09:30:39 +00:00
parent 89e1215296
commit 8edafac8e4
2 changed files with 373 additions and 373 deletions

View File

@ -107,10 +107,10 @@ class Doctrine_Validator {
$class = "Doctrine_Validator_".ucwords(strtolower($name)); $class = "Doctrine_Validator_".ucwords(strtolower($name));
if(class_exists($class)) { if(class_exists($class)) {
self::$validators[$name] = new $class; self::$validators[$name] = new $class;
} elseif(class_exists($name."Validator")) { } else {
self::$validators[$name] = new $name."Validator"; throw new Doctrine_Exception("Validator named '$name' not availible.");
} else }
throw new Doctrine_Exception("Validator named '$name' not availible.");
} }
return self::$validators[$name]; return self::$validators[$name];
} }

View File

@ -1,5 +1,5 @@
<?php <?php
class ValidatorUSState { class Doctrine_Validator_Usstate {
private static $states = array ( private static $states = array (
"AK" => true, "AK" => true,
"AL" => true, "AL" => true,