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)); }
protected function iterationStep() { if ($this->position <= 2 && ($this->account[3] == 5 || substr($this->account, 3, 2) == 69)) { return; } parent::iterationStep(); }
public function __construct(Bank $bank) { parent::__construct($bank); $this->setWeights(array(2, 3, 4, 5)); $this->setStart(-2); $this->setEnd(5); }
protected function init($account) { parent::init($account); if (substr($this->account, 0, 2) === '00') { $this->account = substr($this->account, 2) . '00'; } }
public function __construct(Bank $bank) { parent::__construct($bank); $this->setWeights(array(2, 3, 4, 5, 6, 7)); $this->setStart(-3); $this->setEnd(2); $this->setChecknumberPosition(-2); }
public function __construct(Bank $bank) { parent::__construct($bank); $this->setWeights(array(9, 10, 5, 8, 4, 2)); $this->setStart(0); $this->setEnd(5); $this->setChecknumberPosition(6); }
public function __construct(Bank $bank) { parent::__construct($bank); $this->validator1 = new Validator06($bank); $this->validator1->setWeights(array(2, 3, 4, 5, 6, 7, 8, 0, 0)); $this->validatorChain = new ValidatorChain($bank); $validator2 = new Validator06($bank); $validator2->setWeights(array(2, 3, 4, 5, 6, 7, 0, 0, 0)); $this->validatorChain->addValidator($validator2); $validator3 = new Validator06($bank); $validator3->setWeights(array(2, 3, 4, 5, 6, 7, 0, 0, 0)); $validator3->setDivisor(7); $this->validatorChain->addValidator($validator3); $validator4 = new Validator06($bank); $validator4->setWeights(array(2, 3, 4, 5, 6, 7, 0, 0, 0)); $validator4->setDivisor(10); $this->validatorChain->addValidator($validator4); }
public function __construct(Bank $bank) { parent::__construct($bank); $this->setWeights(array(2, 3, 4, 5, 6, 7, 8, 9, 10)); }
public function __construct(Bank $bank) { parent::__construct($bank); $this->setWeights(array(2, 4, 8, 5, 10, 9)); $this->setEnd(3); }
protected function init($account) { parent::init($account); $this->setEnd($this->account[2] == 9 ? 2 : 3); }
public function isValid($account) { $length = strlen(ltrim($account, '0')); return ($length == 8 || $length == 9) && $this->validator10->isValid($account) || $length == 7 && parent::isValid($account); }
public function isValid($account) { return parent::isValid($account) || $this->isBetween(396000000, 499999999); }
protected function getResult() { return $this->accumulator % 11 === 1 ? $this->getChecknumber() === $this->account[$this->getNormalizedPosition($this->checknumberPosition) - 1] : parent::getResult(); }
public function isValid($account) { return parent::isValid($account) || $this->isBetween(1, 1999999) || $this->isBetween(9000000, 25999999) || $this->isBetween(396000000, 499999999) || $this->isBetween(700000000, 799999999) || $this->isBetween(910000000, 989999999); }