__construct() 공개 메소드

public __construct ( $groups = null )
예제 #1
0
 /**
  * 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;
 }
예제 #2
0
 /**
  * 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;
 }
예제 #3
0
 public function __construct(callable $call, array $args = null, $config = [])
 {
     parent::__construct($config);
     $this->call = $call;
     if (!empty($args)) {
         $this->args = $args;
     }
 }
예제 #4
0
 /**
  * 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);
 }
예제 #5
0
 /**
  * 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);
 }
예제 #6
0
파일: Required.php 프로젝트: mirdware/scoop
 public function __construct($fields)
 {
     parent::__construct('required', $fields);
 }
예제 #7
0
 public function __construct($pattern)
 {
     parent::__construct();
     $this->pattern = $pattern;
 }
예제 #8
0
파일: In.php 프로젝트: romeoz/rock-validate
 public function __construct($haystack, $compareIdentical = false, $config = [])
 {
     parent::__construct($config);
     $this->params['haystack'] = $haystack;
     $this->params['compareIdentical'] = $compareIdentical;
 }
예제 #9
0
파일: Pattern.php 프로젝트: mirdware/scoop
 public function __construct($fields, $pattern, $mask = '')
 {
     parent::__construct('pattern', $fields, array('pattern' => $pattern, 'mask' => $mask));
 }
예제 #10
0
파일: NestedRule.php 프로젝트: enumag/ivory
 /**
  * @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;
 }
예제 #11
0
 /**
  * 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;
 }
예제 #12
0
 /**
  * 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;
 }
예제 #13
0
 public function __construct($compareTo, $compareIdentical = false, $config = [])
 {
     parent::__construct($config);
     $this->params['compareTo'] = $compareTo;
     $this->params['compareIdentical'] = $compareIdentical;
 }
예제 #14
0
파일: Max.php 프로젝트: mirdware/scoop
 public function __construct($fields, $max)
 {
     parent::__construct('max', $fields, array('max' => $max));
 }
예제 #15
0
파일: Key.php 프로젝트: evoke-php/evoke-php
 /**
  * KeyValue constructor.
  *
  * @param callable $callback
  * @param string   $key
  */
 public function __construct(callable $callback, $key)
 {
     parent::__construct($callback);
     $this->key = $key;
 }
예제 #16
0
 /**
  * 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;
 }
예제 #17
0
파일: Number.php 프로젝트: mirdware/scoop
 public function __construct($fields)
 {
     parent::__construct('number', $fields);
 }
예제 #18
0
파일: Email.php 프로젝트: mirdware/scoop
 public function __construct($fields)
 {
     parent::__construct('email', $fields);
 }
예제 #19
0
 /**
  * @inheritdoc
  */
 public function __construct(bool $authoritative = false)
 {
     parent::__construct($authoritative);
 }
예제 #20
0
파일: Equals.php 프로젝트: mirdware/scoop
 public function __construct($fields, $inputs)
 {
     parent::__construct('equals', $fields, array('inputs' => $inputs), true);
 }
예제 #21
0
 /**
  * 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;
 }
예제 #22
0
 /**
  * Constructor
  *
  * @return PregRule
  * @author Justin Palmer
  **/
 public function __construct($preg = null, $message = null)
 {
     $this->preg = $preg;
     $this->message = $message;
     parent::__construct();
 }
예제 #23
0
 public function __construct($regex = null, $config = [])
 {
     parent::__construct($config);
     $this->params['regex'] = $regex;
 }
예제 #24
0
 /**
  * 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;
 }
예제 #25
0
파일: Length.php 프로젝트: mirdware/scoop
 public function __construct($fields, $min, $max)
 {
     parent::__construct('length', $fields, array('min' => $min, 'max' => $max));
 }
예제 #26
0
 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);
 }
예제 #28
0
 /**
  * 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;
 }
예제 #29
0
 public function __construct($containsValue, $identical = false, $config = [])
 {
     parent::__construct($config);
     $this->params['containsValue'] = $containsValue;
     $this->params['identical'] = $identical;
 }
예제 #30
0
 public function __construct($min, $inclusive = false, $config = [])
 {
     parent::__construct($config);
     $this->params['minValue'] = $min;
     $this->params['inclusive'] = $inclusive;
 }