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


PHP Parameter::__construct方法代码示例

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


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

示例1: __construct

 /**
  * <ul>
  * <li>By default the option is <i>OFF</i></li>
  * <li>The output when option is <i>ON</i> is this parameter name</li>
  * <li>The output when option is <i>OFF</i> is empty string</li>
  * <li>The parameter is not required</li>
  * </ul>  
  * @param string $name The parameter name, case insensitive
  * @throws \MWException When $name not set
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->default_value = false;
     $this->output_on = $name;
     $this->output_off = '';
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:17,代码来源:Option.php

示例2: __construct

 /**
  * <ul>
  * <li>The default value is 0</li>
  * <li>No minimal value</li>
  * <li>No maximal value</li>
  * <li>The parameter is not required</li>
  * </ul>  
  * @param string $name The parameter name, case insensitive
  * @throws \MWException When $name not set
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->default_value = 0;
     $this->min = null;
     $this->max = null;
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:17,代码来源:Integer.php

示例3: __construct

 /**
  * <ul>
  * <li>The default value is the empty string</li>
  * <li>HTML content is escaped for output.</li>
  * <li>No validation of the content of the value</li>
  * <li>Minimal length is 0 (accepts empty string)</li>
  * <li>Maximal length is 1024</li>
  * <li>The parameter is not required</li>
  * </ul>
  * 
  * @param string $name The parameter name, case insensitive
  * @throws \MWException When $name not set
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->escape_mode = 'html';
     $this->validate_type = 'all';
     // validates everything
     $this->min_length = 0;
     // accepts empty string
     $this->max_length = 1024;
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:23,代码来源:String.php

示例4: __construct

 /**
  * Constructor.
  * 
  * @since 0.4
  * 
  * @param string $name
  * @param string $delimiter
  * @param mixed $type
  * @param mixed $default Use null for no default (which makes the parameter required)
  * @param array $aliases
  * @param array $criteria
  */
 public function __construct($name, $delimiter = ListParameter::DEFAULT_DELIMITER, $type = Parameter::TYPE_STRING, $default = null, array $aliases = array(), array $criteria = array())
 {
     $itemCriteria = array();
     $listCriteria = array();
     $this->cleanCriteria($criteria);
     foreach ($criteria as $criterion) {
         if ($criterion->isForLists()) {
             $listCriteria[] = $criterion;
         } else {
             $itemCriteria[] = $criterion;
         }
     }
     $this->listCriteria = $listCriteria;
     parent::__construct($name, $type, $default, $aliases, $itemCriteria);
     $this->delimiter = $delimiter;
 }
开发者ID:JeroenDeDauw,项目名称:phpapi,代码行数:28,代码来源:ListParameter.php

示例5:

 /**
  * @see ParameterTemplateParameterInterface::__construct()
  * @param integer $parameter_id
  */
 function __construct($parameter_id)
 {
     parent::__construct($parameter_id);
 }
开发者ID:suxinde2009,项目名称:www,代码行数:8,代码来源:parameter_template_parameter.class.php

示例6: __construct

 public function __construct(Parameter $parameter)
 {
     parent::__construct($parameter->getName(), $parameter->isRequired());
     $this->parameter = $parameter;
 }
开发者ID:projectstorm,项目名称:php-actions,代码行数:5,代码来源:ArrayParameter.php

示例7: __construct

 /**
  * <ul>
  * <li>The default value is boolean <i>false</i></li>
  * <li>The parameter is not required</li>
  * </ul>  
  * @param string $name The parameter name, case insensitive
  * @throws \MWException When $name not set
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->default_value = false;
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:13,代码来源:Boolean.php

示例8: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct(array('required' => true, 'format' => true));
 }
开发者ID:fabricius,项目名称:fabricius,代码行数:7,代码来源:Body.php

示例9: __construct

 public function __construct($name, $class, $required = true)
 {
     parent::__construct($name, $required);
     $this->class = $class;
 }
开发者ID:projectstorm,项目名称:php-actions,代码行数:5,代码来源:ObjectParameter.php

示例10: __construct

 /**
  * This parameter is a container for several sub-parameters.
  * Only one of these can be set by user (the XOR condition)
  * 
  * Typical usage is for a "float" parameter, that contains options
  * "right" and "left". See Vimeo widget for example.
  * 
  * <ul>
  * <li>The default value is the empty string</li>
  * <li>No default sub-parameter</li>
  * <li>The parameter is not required</li>
  * </ul>
  * 
  * @param string $name The parameter name, case insensitive
  * @throws \MWException If $name not set
  */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->parameters = array();
     $this->default_parameter = null;
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:22,代码来源:XorParameter.php


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