当前位置: 首页>>代码示例>>PHP>>正文


PHP Rule::__construct方法代码示例

本文整理汇总了PHP中Rule::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Rule::__construct方法的具体用法?PHP Rule::__construct怎么用?PHP Rule::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Rule的用法示例。


在下文中一共展示了Rule::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * 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;
 }
开发者ID:lovenunu,项目名称:Hoa-compiler,代码行数:17,代码来源:Repetition.php

示例2: __construct

 /**
  * 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;
 }
开发者ID:evoke-php,项目名称:evoke-php,代码行数:15,代码来源:Equal.php

示例3: __construct

 public function __construct(callable $call, array $args = null, $config = [])
 {
     parent::__construct($config);
     $this->call = $call;
     if (!empty($args)) {
         $this->args = $args;
     }
 }
开发者ID:romeoz,项目名称:rock-validate,代码行数:8,代码来源:Call.php

示例4: __construct

 /**
  * 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);
 }
开发者ID:ToddBudde,项目名称:phrails,代码行数:15,代码来源:IntegerRangeRule.php

示例5: __construct

 /**
  * 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);
 }
开发者ID:evoke-php,项目名称:evoke-php,代码行数:19,代码来源:Number.php

示例6: __construct

 public function __construct($fields)
 {
     parent::__construct('required', $fields);
 }
开发者ID:mirdware,项目名称:scoop,代码行数:4,代码来源:Required.php

示例7: __construct

 public function __construct($pattern)
 {
     parent::__construct();
     $this->pattern = $pattern;
 }
开发者ID:nterray,项目名称:tuleap,代码行数:5,代码来源:Rule.class.php

示例8: __construct

 public function __construct($haystack, $compareIdentical = false, $config = [])
 {
     parent::__construct($config);
     $this->params['haystack'] = $haystack;
     $this->params['compareIdentical'] = $compareIdentical;
 }
开发者ID:romeoz,项目名称:rock-validate,代码行数:6,代码来源:In.php

示例9: __construct

 public function __construct($fields, $pattern, $mask = '')
 {
     parent::__construct('pattern', $fields, array('pattern' => $pattern, 'mask' => $mask));
 }
开发者ID:mirdware,项目名称:scoop,代码行数:4,代码来源:Pattern.php

示例10: __construct

 /**
  * @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;
 }
开发者ID:enumag,项目名称:ivory,代码行数:12,代码来源:NestedRule.php

示例11: __construct

 /**
  * 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;
 }
开发者ID:evoke-php,项目名称:evoke-php,代码行数:11,代码来源:Blank.php

示例12: __construct

 /**
  * 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;
 }
开发者ID:evoke-php,项目名称:evoke-php,代码行数:13,代码来源:StrReplaceRight.php

示例13: __construct

 public function __construct($compareTo, $compareIdentical = false, $config = [])
 {
     parent::__construct($config);
     $this->params['compareTo'] = $compareTo;
     $this->params['compareIdentical'] = $compareIdentical;
 }
开发者ID:romeoz,项目名称:rock-validate,代码行数:6,代码来源:Equals.php

示例14: __construct

 public function __construct($fields, $max)
 {
     parent::__construct('max', $fields, array('max' => $max));
 }
开发者ID:mirdware,项目名称:scoop,代码行数:4,代码来源:Max.php

示例15: __construct

 /**
  * KeyValue constructor.
  *
  * @param callable $callback
  * @param string   $key
  */
 public function __construct(callable $callback, $key)
 {
     parent::__construct($callback);
     $this->key = $key;
 }
开发者ID:evoke-php,项目名称:evoke-php,代码行数:11,代码来源:Key.php


注:本文中的Rule::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。