當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。