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


PHP Validator::__construct方法代码示例

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


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

示例1: __construct

 /**
  * @param string $indexType
  * @param Type $pageType
  * @param array $cacheWarmers
  * @param Maintenance $out
  */
 public function __construct($indexType, $pageType, array $cacheWarmers = array(), Maintenance $out = null)
 {
     parent::__construct($out);
     $this->indexType = $indexType;
     $this->pageType = $pageType;
     $this->cacheWarmers = $cacheWarmers;
 }
开发者ID:zoglun,项目名称:mediawiki-extensions-CirrusSearch,代码行数:13,代码来源:CacheWarmersValidator.php

示例2: __construct

 /**
  * @param Index $index
  * @param string $indexType
  * @param int|string $maxShardsPerNode
  * @param Maintenance $out
  */
 public function __construct(Index $index, $indexType, $maxShardsPerNode, Maintenance $out = null)
 {
     parent::__construct($out);
     $this->index = $index;
     $this->indexType = $indexType;
     $this->maxShardsPerNode = $maxShardsPerNode;
 }
开发者ID:zoglun,项目名称:mediawiki-extensions-CirrusSearch,代码行数:13,代码来源:MaxShardsPerNodeValidator.php

示例3: __construct

 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->mode1 = new Validator17($bank);
     $this->mode1->setWeights(array(1, 2));
     $this->mode2 = new ValidatorC1b($bank);
 }
开发者ID:bmdevel,项目名称:bav,代码行数:7,代码来源:ValidatorC1.php

示例4: __construct

 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->mode1 = new Validator09($bank);
     $this->mode2 = new Validator06($bank);
     $this->mode2->setWeights(array(2, 3, 4, 5, 6, 7));
 }
开发者ID:bmdevel,项目名称:bav,代码行数:7,代码来源:ValidatorB0.php

示例5: __construct

 public function __construct($params = array())
 {
     parent::__construct($params);
     $this->foreignTable = isset($params['foreignTable']) ? (string) $params['foreignTable'] : '';
     if ($this->foreignTable == '') {
         throw new Exception('Missing or empty foreignTable parameter');
     }
     $this->foreignKeyMapping = array();
     $idx = 0;
     $fkms = isset($params['foreignKeyMapping']) && is_array($params['foreignKeyMapping']) ? $params['foreignKeyMapping'] : array();
     foreach ($fkms as $fkm) {
         $idx++;
         $tp = isset($fkm['type']) ? $this->cleanUpPreparedStatementType((string) $fkm['type']) : 'int';
         if ($tp == false) {
             throw new Exception(sprintf('Invalid type parameter in foreignKeyMapping entry #%d', $idx));
         }
         $local = isset($fkm['local']) ? (string) $fkm['local'] : '';
         if ($local == '') {
             throw new Exception(sprintf('Missing or empty local parameter in foreignKeyMapping entry #%d', $idx));
         }
         $foreign = isset($fkm['foreign']) ? (string) $fkm['foreign'] : '';
         if ($foreign == '') {
             throw new Exception(sprintf('Missing or empty foreign parameter in foreignKeyMapping entry #%d', $idx));
         }
         $this->foreignKeyMapping[] = (object) array('type' => $tp, 'local' => $local, 'foreign' => $foreign);
     }
     if (empty($this->foreignKeyMapping)) {
         throw new Exception('Missing, empty or invalid foreignKeyMapping parameter');
     }
 }
开发者ID:roncemer,项目名称:pfmgr2,代码行数:30,代码来源:ForeignKeyValidator.class.php

示例6: __construct

 /**
  * @param Client $client
  * @param string $aliasName
  * @param string $specificIndexName
  * @param bool $startOver
  * @param Maintenance $out
  */
 public function __construct(Client $client, $aliasName, $specificIndexName, $startOver, Maintenance $out = null)
 {
     parent::__construct($out);
     $this->client = $client;
     $this->aliasName = $aliasName;
     $this->specificIndexName = $specificIndexName;
     $this->startOver = $startOver;
 }
开发者ID:zoglun,项目名称:mediawiki-extensions-CirrusSearch,代码行数:15,代码来源:IndexAliasValidator.php

示例7: __construct

 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->mode1 = new Validator20($bank);
     $this->mode1->setWeights(array(2, 3, 4, 5, 6, 7, 8, 9, 3));
     $this->mode2 = new Validator53($bank);
     $this->mode2->setWeights(array(2, 4, 8, 5, 10, 9, 7, 3, 6, 1, 2, 4));
 }
开发者ID:bmdevel,项目名称:bav,代码行数:8,代码来源:ValidatorB6.php

示例8: __construct

 public function __construct($data, $fields = array())
 {
     global $current_language;
     parent::__construct($data, $fields, substr($current_language, 0, 2), 'include/validation/lang');
     foreach ($this->CustomValidations as $validation => $function) {
         $this->addRule($validation, $function, getTranslatedString('INVALID'));
     }
 }
开发者ID:kduqi,项目名称:corebos,代码行数:8,代码来源:load_validations.php

示例9: __construct

 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->mode1 = new Validator00($bank);
     $this->mode2 = new Validator00($bank);
     $this->mode2->setStart(-3);
     $this->mode2->setChecknumberPosition(-2);
 }
开发者ID:bmdevel,项目名称:bav,代码行数:8,代码来源:Validator79.php

示例10: __construct

 public function __construct($params = array())
 {
     parent::__construct($params);
     $this->valueName = isset($params['valueName']) ? $params['valueName'] : '';
     if ($this->valueName == '') {
         throw new Exception('Missing or empty valueName parameter');
     }
 }
开发者ID:roncemer,项目名称:pfmgr2,代码行数:8,代码来源:NotEmptyValidator.class.php

示例11: __construct

 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->mode1 = new Validator15($bank);
     $this->mode1->setWeights(array(2, 3, 4, 5));
     $this->mode2 = new Validator58($bank);
     $this->mode2->setWeights(array(2, 3, 4, 5, 6, 0, 0, 0, 0));
 }
开发者ID:bmdevel,项目名称:bav,代码行数:8,代码来源:ValidatorC4.php

示例12: __construct

 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->mode1 = new Validator00($bank);
     $this->mode1->setWeights(array(2, 1));
     $this->mode2 = new Validator01($bank);
     $this->mode2->setWeights(array(3, 7, 1));
 }
开发者ID:bmdevel,项目名称:bav,代码行数:8,代码来源:ValidatorA6.php

示例13:

	/**
	 * Pass each field to be validated as a seperate argument
	 * to the constructor of this object. (an array of elements are ok)
	 */
	function __construct() {
		$Required = func_get_args();
		if( isset($Required[0]) && is_array( $Required[0] ) )
			$Required = $Required[0];
		$this->required = $Required;

		parent::__construct();
	}
开发者ID:neopba,项目名称:silverstripe-book,代码行数:12,代码来源:RequiredFields.php

示例14: __construct

 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->mode1 = new Validator75($bank);
     $this->mode2 = new Validator29($bank);
     $this->mode3 = new Validator00($bank);
     $this->mode4 = new Validator09($bank);
 }
开发者ID:bmdevel,项目名称:bav,代码行数:8,代码来源:ValidatorC5.php

示例15: __construct

 public function __construct($x)
 {
     $this->context = stream_context_create(array('http' => array('header' => "User-agent: Mozilla")));
     parent::__construct($x);
     $this->population2010 = str_replace('ё', 'е', @file_get_contents('../parser/population2010.txt'));
     $this->population2012 = str_replace('ё', 'е', @file_get_contents('../parser/population2012.txt'));
     $this->population2013 = str_replace('ё', 'е', @file_get_contents('../parser/population2013.txt'));
     $this->populationFix = str_replace('ё', 'е', @file_get_contents('../parser/populationFix.txt'));
 }
开发者ID:KooLru,项目名称:validator,代码行数:9,代码来源:wiki_places.php


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