Exemplo n.º 1
0
 /**
  * Sets validator options
  *
  * @param  array  The options for validator.
  */
 public function __construct($option = null)
 {
     if (!is_array($option)) {
         Util\ZendValUtils::convertToString($option);
         $option = ['pattern' => $option];
     }
     parent::__construct($option);
 }
Exemplo n.º 2
0
 /**
  * Sets validator options
  *
  * @param  array  The options for validator
  */
 public function __construct($option = null)
 {
     if (!is_array($option)) {
         list($min, $max, $encoding) = Util\ParameterUtils::parse(func_get_args(), 'l|ls');
         $this->setOption('min', $min);
         if ($max) {
             $this->setOption('max', $max);
         }
         if ($encoding) {
             $this->setOption('encoding', $encoding);
         }
     }
     parent::__construct($option);
 }
Exemplo n.º 3
0
 public function validate()
 {
     $resultObject = ValidatorBase::validate($this);
     $this->hasErrors = $resultObject->hasErrors;
     $this->errors = $resultObject->errors;
 }
Exemplo n.º 4
0
 public function save()
 {
     parent::save();
     vidtrial_update_cron();
 }