Example #1
0
 protected function init($account)
 {
     parent::init($account);
     if (substr($this->account, 0, 2) === '00') {
         $this->account = substr($this->account, 2) . '00';
     }
 }
Example #2
0
 public function isValid($account)
 {
     if (parent::isValid($account)) {
         return true;
     }
     $account = ltrim($account, '0') . '000';
     return strlen($account) <= $this->normalizedSize && parent::isValid($account);
 }
Example #3
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validator1 = new System06($bankId);
     $this->validator1->setWeights(array(2, 3, 4, 5, 6, 7, 8, 0, 0));
     $validator2 = new System06($bankId);
     $validator2->setWeights(array(2, 3, 4, 5, 6, 7, 0, 0, 0));
     $validator3 = new System06($bankId);
     $validator3->setWeights(array(2, 3, 4, 5, 6, 7, 0, 0, 0));
     $validator3->setModulo(7);
     $validator4 = new System06($bankId);
     $validator4->setWeights(array(2, 3, 4, 5, 6, 7, 0, 0, 0));
     $validator4->setModulo(10);
     $this->validatorChain = new \Bav\Validator\Chain($bankId);
     $this->validatorChain->addValidator($validator2);
     $this->validatorChain->addValidator($validator3);
     $this->validatorChain->addValidator($validator4);
 }
Example #4
0
 public function isValid($account)
 {
     return parent::isValid($account) || Math::isBetween($account, 396000000, 499999999);
 }
Example #5
0
 protected function init($account)
 {
     parent::init($account);
     $this->setEnd($this->account[2] == 9 ? 2 : 3);
 }
Example #6
0
 public function isValid($account)
 {
     $length = strlen(ltrim($account, '0'));
     return ($length == 8 || $length == 9) && $this->validator10->isValid($account) || $length == 7 && parent::isValid($account);
 }
Example #7
0
 protected function getResult()
 {
     return $this->accumulator % $this->modulo === 1 ? $this->getChecknumber() === $this->account[Math::getNormalizedPosition($this->account, $this->checknumberPosition) - 1] : parent::getResult();
 }