Commit 8edafac8 authored by elliot's avatar elliot

Changed ValidatorUSState to conform to the standard Doctrine_Validator_*...

Changed ValidatorUSState to conform to the standard Doctrine_Validator_* naming scheme and removed the old style from Doctrine_Validator
parent 89e12152
...@@ -107,11 +107,11 @@ class Doctrine_Validator { ...@@ -107,11 +107,11 @@ 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";
} else
throw new Doctrine_Exception("Validator named '$name' not availible."); throw new Doctrine_Exception("Validator named '$name' not availible.");
} }
}
return self::$validators[$name]; return self::$validators[$name];
} }
/** /**
......
<?php <?php
class ValidatorUSState { class Doctrine_Validator_Usstate {
private static $states = array ( private static $states = array (
"AK" => true, "AK" => true,
"AL" => true, "AL" => true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment