/** * Constructor. * * @param string $name Name. * @param int $min Minimum bound. * @param int $max Maximum bound. * @param mixed $content Content. * @param string $nodeId Node ID. * @return void */ public function __construct($name, $min, $max, $content, $nodeId) { parent::__construct($name, $content, $nodeId); $this->_min = $min; $this->_max = $max; return; }
/** * Construct an Equal rule. * * @param string $controller * @param string $match * @param mixed[] $params * @param bool $authoritative Whether the rule is authoritative. */ public function __construct(string $controller, string $match, array $params = [], bool $authoritative = true) { parent::__construct($authoritative); $this->controller = $controller; $this->match = $match; $this->params = $params; }
public function __construct(callable $call, array $args = null, $config = []) { parent::__construct($config); $this->call = $call; if (!empty($args)) { $this->args = $args; } }
/** * constructor * * @return LengthRule * @author Justin Palmer **/ public function __construct($min, $max, $message = '%s should be between {min} and {max}.') { $this->min = $min; $this->max = $max; $message = str_replace('{min}', $min, $message); $message = str_replace('{max}', $max, $message); $this->message = ''; parent::__construct($message); }
/** * Create a rule to get the number from the URI as a parameter. * * @param string $controller * @param string $key The parameter key to store the number in. * @param string $prefix The prefix to match. * @param string $suffix An optional suffix to match. * @param bool $authoritative Whether the rule is authoritative. */ public function __construct(string $controller, string $key, string $prefix, string $suffix = '', bool $authoritative = true) { parent::__construct($authoritative); $this->controller = $controller; $this->key = $key; $this->prefix = $prefix; $this->prefixLen = strlen($prefix); $this->suffix = $suffix; $this->suffixLen = strlen($suffix); }
public function __construct($fields) { parent::__construct('required', $fields); }
public function __construct($pattern) { parent::__construct(); $this->pattern = $pattern; }
public function __construct($haystack, $compareIdentical = false, $config = []) { parent::__construct($config); $this->params['haystack'] = $haystack; $this->params['compareIdentical'] = $compareIdentical; }
public function __construct($fields, $pattern, $mask = '') { parent::__construct('pattern', $fields, array('pattern' => $pattern, 'mask' => $mask)); }
/** * @param array * @param array * @param array * @return void */ public function __construct(array $selectors = array(''), array $prefixes = array(''), array $statement = NULL) { parent::__construct($selectors); $this->prefixes = $prefixes; $this->statement = $statement; }
/** * Construct the Blank URI Rule. * * @param string $value Value for a blank URI. * @param bool $authoritative Whether the rule can definitely give the final route for all URIs that it matches. */ public function __construct(string $value, bool $authoritative = true) { parent::__construct($authoritative); $this->value = $value; }
/** * Construct the right string replacement rule. * * @param string $match The string to match on. * @param string $replacement The string to use as a replacement. * @param bool $authoritative Whether the rule can definitely give the final route for all URIs that it matches. */ public function __construct(string $match, string $replacement, bool $authoritative = false) { parent::__construct($authoritative); $this->match = $match; $this->replacement = $replacement; }
public function __construct($compareTo, $compareIdentical = false, $config = []) { parent::__construct($config); $this->params['compareTo'] = $compareTo; $this->params['compareIdentical'] = $compareIdentical; }
public function __construct($fields, $max) { parent::__construct('max', $fields, array('max' => $max)); }
/** * KeyValue constructor. * * @param callable $callback * @param string $key */ public function __construct(callable $callback, $key) { parent::__construct($callback); $this->key = $key; }
/** * Construct the Exact rule. * * @param string $outputFormat The output format for the rule. * @param mixed[] $match The match required from the media type. */ public function __construct(string $outputFormat, array $match) { parent::__construct($outputFormat); $this->match = $match; }
public function __construct($fields) { parent::__construct('number', $fields); }
public function __construct($fields) { parent::__construct('email', $fields); }
/** * @inheritdoc */ public function __construct(bool $authoritative = false) { parent::__construct($authoritative); }
public function __construct($fields, $inputs) { parent::__construct('equals', $fields, array('inputs' => $inputs), true); }
/** * Construct the LeftTrim URI Rule. * * @param string $characters The characters to left trim from the URI. * @param bool $authoritative * Whether the rule can definitely give the final * route for all URIs that it matches. */ public function __construct(string $characters, bool $authoritative = false) { parent::__construct($authoritative); $this->characters = $characters; }
/** * Constructor * * @return PregRule * @author Justin Palmer **/ public function __construct($preg = null, $message = null) { $this->preg = $preg; $this->message = $message; parent::__construct(); }
public function __construct($regex = null, $config = []) { parent::__construct($config); $this->params['regex'] = $regex; }
/** * Construct the UpperCaseFirst Rule. * * @param string[] $delimiters Delimiter strings that show the boundary of words. * @param bool $authoritative Whether the rule can definitely give the final route for all URIs that it matches. */ public function __construct(array $delimiters, bool $authoritative = false) { parent::__construct($authoritative); $this->delimiters = $delimiters; }
public function __construct($fields, $min, $max) { parent::__construct('length', $fields, array('min' => $min, 'max' => $max)); }
public function __construct($fields, $min) { parent::__construct('minLength', $fields, array('min' => $min)); }
public function __construct($value, $maxlength, $fieldname) { $this->maxlength = $maxlength; parent::__construct($value, $fieldname); }
/** * Construct the prepend rule. * * @param string $str The string to prepend. * @param bool $authoritative * Whether the rule can definitely give the final route * for all URIs that it matches. */ public function __construct(string $str, bool $authoritative = false) { parent::__construct($authoritative); $this->str = $str; }
public function __construct($containsValue, $identical = false, $config = []) { parent::__construct($config); $this->params['containsValue'] = $containsValue; $this->params['identical'] = $identical; }
public function __construct($min, $inclusive = false, $config = []) { parent::__construct($config); $this->params['minValue'] = $min; $this->params['inclusive'] = $inclusive; }