예제 #1
0
 public function __construct($config = null)
 {
     $this->_messageTemplates[self::NOT_MODULO] = "'%value%' modulus '%mod%' is not 0";
     parent::__construct($config);
     if ($config instanceof Zend_Config) {
         $config = $config->toArray();
     }
     if (is_array($config)) {
         foreach ($config as $key => $value) {
             $method = 'set' . ucfirst($key);
             if (method_exists($this, $method)) {
                 $this->{$method}($value);
             }
         }
     }
 }
예제 #2
0
 public function __construct($locale = null)
 {
     parent::__construct($locale);
     $this->_messageTemplates[self::INVALID] = trlKwfStatic("Invalid type given, value should be string or integer");
     $this->_messageTemplates[self::NOT_INT] = trlKwfStatic("'%value%' does not appear to be an integer");
 }