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


PHP CValidator::__construct方法代码示例

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


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

示例1: __construct

 public function __construct(array $options = array())
 {
     parent::__construct($options);
     $valueTypesAll = array(ITEM_VALUE_TYPE_FLOAT => true, ITEM_VALUE_TYPE_UINT64 => true, ITEM_VALUE_TYPE_STR => true, ITEM_VALUE_TYPE_TEXT => true, ITEM_VALUE_TYPE_LOG => true);
     $valueTypesNum = array(ITEM_VALUE_TYPE_FLOAT => true, ITEM_VALUE_TYPE_UINT64 => true);
     $valueTypesChar = array(ITEM_VALUE_TYPE_STR => true, ITEM_VALUE_TYPE_TEXT => true, ITEM_VALUE_TYPE_LOG => true);
     $valueTypesLog = array(ITEM_VALUE_TYPE_LOG => true);
     $valueTypesInt = array(ITEM_VALUE_TYPE_UINT64 => true);
     $argsIgnored = array(array('type' => 'str'));
     $this->allowed = array('abschange' => array('args' => $argsIgnored, 'value_types' => $valueTypesAll), 'avg' => array('args' => array(array('type' => 'sec_num', 'mandat' => true), array('type' => 'sec_zero', 'can_be_empty' => true)), 'value_types' => $valueTypesNum), 'band' => array('args' => array(array('type' => 'sec_num_zero', 'mandat' => true, 'can_be_empty' => true), array('type' => 'num', 'mandat' => true), array('type' => 'sec_zero', 'can_be_empty' => true)), 'value_types' => $valueTypesInt), 'change' => array('args' => $argsIgnored, 'value_types' => $valueTypesAll), 'count' => array('args' => array(array('type' => 'sec_num', 'mandat' => true), array('type' => 'str'), array('type' => 'operation'), array('type' => 'sec_zero', 'can_be_empty' => true)), 'value_types' => $valueTypesAll), 'date' => array('args' => $argsIgnored, 'value_types' => $valueTypesAll), 'dayofmonth' => array('args' => $argsIgnored, 'value_types' => $valueTypesAll), 'dayofweek' => array('args' => $argsIgnored, 'value_types' => $valueTypesAll), 'delta' => array('args' => array(array('type' => 'sec_num', 'mandat' => true), array('type' => 'sec_zero', 'can_be_empty' => true)), 'value_types' => $valueTypesNum), 'diff' => array('args' => $argsIgnored, 'value_types' => $valueTypesAll), 'fuzzytime' => array('args' => array(array('type' => 'sec_zero', 'mandat' => true)), 'value_types' => $valueTypesNum), 'iregexp' => array('args' => array(array('type' => 'str', 'mandat' => true), array('type' => 'sec_num', 'can_be_empty' => true)), 'value_types' => $valueTypesChar), 'last' => array('args' => array(array('type' => 'sec_num_zero', 'mandat' => true, 'can_be_empty' => true), array('type' => 'sec_zero', 'can_be_empty' => true)), 'value_types' => $valueTypesAll), 'logeventid' => array('args' => array(array('type' => 'str', 'mandat' => true)), 'value_types' => $valueTypesLog), 'logseverity' => array('args' => $argsIgnored, 'value_types' => $valueTypesLog), 'logsource' => array('args' => array(array('type' => 'str', 'mandat' => true)), 'value_types' => $valueTypesLog), 'max' => array('args' => array(array('type' => 'sec_num', 'mandat' => true), array('type' => 'sec_zero', 'can_be_empty' => true)), 'value_types' => $valueTypesNum), 'min' => array('args' => array(array('type' => 'sec_num', 'mandat' => true), array('type' => 'sec_zero', 'can_be_empty' => true)), 'value_types' => $valueTypesNum), 'nodata' => array('args' => array(array('type' => 'sec_zero', 'mandat' => true)), 'value_types' => $valueTypesAll), 'now' => array('args' => $argsIgnored, 'value_types' => $valueTypesAll), 'prev' => array('args' => $argsIgnored, 'value_types' => $valueTypesAll), 'regexp' => array('args' => array(array('type' => 'str', 'mandat' => true), array('type' => 'sec_num', 'can_be_empty' => true)), 'value_types' => $valueTypesChar), 'str' => array('args' => array(array('type' => 'str', 'mandat' => true), array('type' => 'sec_num', 'can_be_empty' => true)), 'value_types' => $valueTypesChar), 'strlen' => array('args' => array(array('type' => 'sec_num_zero', 'mandat' => true, 'can_be_empty' => true), array('type' => 'sec_zero', 'can_be_empty' => true)), 'value_types' => $valueTypesChar), 'sum' => array('args' => array(array('type' => 'sec_num', 'mandat' => true), array('type' => 'sec_zero', 'can_be_empty' => true)), 'value_types' => $valueTypesNum), 'time' => array('args' => $argsIgnored, 'value_types' => $valueTypesAll));
 }
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:11,代码来源:CFunctionValidator.php

示例2: __construct

 public function __construct(array $options = [])
 {
     parent::__construct($options);
     $valueTypesAll = [ITEM_VALUE_TYPE_FLOAT => true, ITEM_VALUE_TYPE_UINT64 => true, ITEM_VALUE_TYPE_STR => true, ITEM_VALUE_TYPE_TEXT => true, ITEM_VALUE_TYPE_LOG => true];
     $valueTypesNum = [ITEM_VALUE_TYPE_FLOAT => true, ITEM_VALUE_TYPE_UINT64 => true];
     $valueTypesChar = [ITEM_VALUE_TYPE_STR => true, ITEM_VALUE_TYPE_TEXT => true, ITEM_VALUE_TYPE_LOG => true];
     $valueTypesLog = [ITEM_VALUE_TYPE_LOG => true];
     $valueTypesInt = [ITEM_VALUE_TYPE_UINT64 => true];
     $argsIgnored = [['type' => 'str']];
     $this->allowed = ['abschange' => ['args' => $argsIgnored, 'value_types' => $valueTypesAll], 'avg' => ['args' => [['type' => 'sec_num', 'mandat' => true], ['type' => 'sec_zero', 'can_be_empty' => true]], 'value_types' => $valueTypesNum], 'band' => ['args' => [['type' => 'sec_num_zero', 'mandat' => true, 'can_be_empty' => true], ['type' => 'num', 'mandat' => true], ['type' => 'sec_zero', 'can_be_empty' => true]], 'value_types' => $valueTypesInt], 'change' => ['args' => $argsIgnored, 'value_types' => $valueTypesAll], 'count' => ['args' => [['type' => 'sec_num', 'mandat' => true], ['type' => 'str'], ['type' => 'operation'], ['type' => 'sec_zero', 'can_be_empty' => true]], 'value_types' => $valueTypesAll], 'date' => ['args' => $argsIgnored, 'value_types' => $valueTypesAll], 'dayofmonth' => ['args' => $argsIgnored, 'value_types' => $valueTypesAll], 'dayofweek' => ['args' => $argsIgnored, 'value_types' => $valueTypesAll], 'delta' => ['args' => [['type' => 'sec_num', 'mandat' => true], ['type' => 'sec_zero', 'can_be_empty' => true]], 'value_types' => $valueTypesNum], 'diff' => ['args' => $argsIgnored, 'value_types' => $valueTypesAll], 'forecast' => ['args' => [['type' => 'sec_num', 'mandat' => true], ['type' => 'sec_zero', 'can_be_empty' => true], ['type' => 'sec_zero', 'mandat' => true], ['type' => 'str', 'can_be_empty' => true], ['type' => 'str', 'can_be_empty' => true]], 'value_types' => $valueTypesNum], 'fuzzytime' => ['args' => [['type' => 'sec_zero', 'mandat' => true]], 'value_types' => $valueTypesNum], 'iregexp' => ['args' => [['type' => 'str', 'mandat' => true], ['type' => 'sec_num', 'can_be_empty' => true]], 'value_types' => $valueTypesChar], 'last' => ['args' => [['type' => 'sec_num_zero', 'mandat' => true, 'can_be_empty' => true], ['type' => 'sec_zero', 'can_be_empty' => true]], 'value_types' => $valueTypesAll], 'logeventid' => ['args' => [['type' => 'str', 'mandat' => true]], 'value_types' => $valueTypesLog], 'logseverity' => ['args' => $argsIgnored, 'value_types' => $valueTypesLog], 'logsource' => ['args' => [['type' => 'str', 'mandat' => true]], 'value_types' => $valueTypesLog], 'max' => ['args' => [['type' => 'sec_num', 'mandat' => true], ['type' => 'sec_zero', 'can_be_empty' => true]], 'value_types' => $valueTypesNum], 'min' => ['args' => [['type' => 'sec_num', 'mandat' => true], ['type' => 'sec_zero', 'can_be_empty' => true]], 'value_types' => $valueTypesNum], 'nodata' => ['args' => [['type' => 'sec_zero', 'mandat' => true]], 'value_types' => $valueTypesAll], 'now' => ['args' => $argsIgnored, 'value_types' => $valueTypesAll], 'percentile' => ['args' => [['type' => 'sec_num', 'mandat' => true], ['type' => 'sec_zero', 'can_be_empty' => true], ['type' => 'percent', 'mandat' => true]], 'value_types' => $valueTypesNum], 'prev' => ['args' => $argsIgnored, 'value_types' => $valueTypesAll], 'regexp' => ['args' => [['type' => 'str', 'mandat' => true], ['type' => 'sec_num', 'can_be_empty' => true]], 'value_types' => $valueTypesChar], 'str' => ['args' => [['type' => 'str', 'mandat' => true], ['type' => 'sec_num', 'can_be_empty' => true]], 'value_types' => $valueTypesChar], 'strlen' => ['args' => [['type' => 'sec_num_zero', 'mandat' => true, 'can_be_empty' => true], ['type' => 'sec_zero', 'can_be_empty' => true]], 'value_types' => $valueTypesChar], 'sum' => ['args' => [['type' => 'sec_num', 'mandat' => true], ['type' => 'sec_zero', 'can_be_empty' => true]], 'value_types' => $valueTypesNum], 'time' => ['args' => $argsIgnored, 'value_types' => $valueTypesAll], 'timeleft' => ['args' => [['type' => 'sec_num', 'mandat' => true], ['type' => 'sec_zero', 'can_be_empty' => true], ['type' => 'num', 'mandat' => true], ['type' => 'str', 'can_be_empty' => true]], 'value_types' => $valueTypesNum]];
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:11,代码来源:CFunctionValidator.php

示例3: __construct

 public function __construct(array $options = [])
 {
     // set validators via the public setter method
     if (isset($options['validators'])) {
         foreach ($options['validators'] as $field => $validator) {
             $this->setValidator($field, $validator);
         }
     }
     unset($options['validator']);
     // set post validators via the public setter method
     if (isset($options['postValidators'])) {
         foreach ($options['postValidators'] as $validator) {
             $this->addPostValidator($validator);
         }
     }
     unset($options['validator']);
     parent::__construct($options);
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:18,代码来源:CSchemaValidator.php


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