本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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));
}
示例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');
}
}
示例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;
}
示例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));
}
示例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'));
}
}
示例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);
}
示例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');
}
}
示例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));
}
示例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));
}
示例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();
}
示例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);
}
示例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'));
}