/** * Constructor. * * The first argument can be: * * * null * * an array of named sfValidatorBase instances * * @param mixed $fields Initial fields * @param array $options An array of options * @param array $messages An array of error messages * * @see sfValidatorBase */ public function __construct($fields = null, $options = array(), $messages = array()) { if (is_array($fields)) { foreach ($fields as $name => $validator) { $this[$name] = $validator; } } else { if (null !== $fields) { throw new InvalidArgumentException('sfValidatorSchema constructor takes an array of sfValidatorBase objects.'); } } parent::__construct($options, $messages); }
/** * Constructor. * * The first argument can be: * * * null * * a sfValidatorBase instance * * an array of sfValidatorBase instances * * @param mixed $validators Initial validators * @param array $options An array of options * @param array $messages An array of error messages * * @see sfValidatorBase */ public function __construct($validators = null, $options = array(), $messages = array()) { if ($validators instanceof sfValidatorBase) { $this->addValidator($validators); } else { if (is_array($validators)) { foreach ($validators as $validator) { $this->addValidator($validator); } } else { if (null !== $validators) { throw new InvalidArgumentException('sfValidatorOr constructor takes a sfValidatorBase object, or a sfValidatorBase array.'); } } } parent::__construct($options, $messages); }
/** * Constructor. * * The first argument can be: * * * null * * a sfValidatorBase instance * * an array of sfValidatorBase instances * * @param mixed $validators Initial validators * @param array $options An array of options * @param array $messages An array of error messages * * @see sfValidatorBase */ public function __construct($validators = null, $options = array(), $messages = array()) { if ($validators instanceof sfValidatorBase) { $this->addValidator($validators); } else { if (is_array($validators)) { foreach ($validators as $validator) { $this->addValidator($validator); } } else { if (!is_null($validators)) { throw new InvalidArgumentException('sfValidatorAnd constructor takes a sfValidatorBase object, or a sfValidatorBase array.'); } } } if (!isset($options['required'])) { $options['required'] = false; } parent::__construct($options, $messages); }
public function __construct($options = array(), $messages = array()) { $this->addRequiredOption(self::OPTION_WIDGET); parent::__construct($options, $messages); }
public function __construct($options = array(), $messages = array()) { $this->addOption('value', null); parent::__construct($options, $messages); }
public function __construct(\Doctrine\ORM\EntityManager $em, $options = array(), $messages = array()) { $this->em = $em; parent::__construct($options, $messages); }
public function __construct($options = array(), $messages = array()) { parent::__construct($options, $messages); }
public function __construct($options = array(), $messages = array()) { $this->addRequiredOption(self::OPTION_MODEL); parent::__construct($options, $messages); $this->addMessage('used', "Sorry ID already used"); }
public function __construct($options = array(), $messages = array()) { parent::__construct($options, $messages); $this->_apiConection = new eSitefApi(); }