/** * Does Not constructor. * @param array|Assert[]|Assert $asserts Assert(s) to not comply with. (Reverse). */ public function __construct($asserts) { if (!is_array($asserts)) { $asserts = array($asserts); } parent::__construct($asserts); }
/** * Custom validator with callback. * * @param callable $callback Callback gets to parameters, first is value, second is options from validator class. */ public function __construct(callable $callback) { parent::__construct(); $this->callback = $callback; }
/** * Contain constructor. * * @param array $conditions List of possible values. * @param bool $strict Strict mode, also check type? Default false. */ public function __construct($conditions, $strict = false) { parent::__construct($conditions, array('strict' => $strict)); }
/** * Url Assert. */ public function __construct() { parent::__construct(); }
/** * Regex constructor. * @param string $regex Your regex. ready for preg_match. */ public function __construct($regex) { parent::__construct(); $this->regex = $regex; }
/** * Validate Date, optional with format. * @param string $format Format to match, NULL for only verify if the date could be parsable with `strtotime()`. */ public function __construct($format = null) { parent::__construct(); $this->format = $format; }
/** * Contain constructor. * * @param array|string $conditions Contains the following items. Could be a single string too. * @param bool $matchCase Match case? Default false. */ public function __construct($conditions, $matchCase = false) { parent::__construct($conditions, array('case' => $matchCase)); }