Exemplo n.º 1
0
 /**
  * @throws BAV_ValidatorException_OutOfBounds
  * @param int $int
  */
 protected function normalizeAccount($account, $size)
 {
     $account = parent::normalizeAccount($account, $size);
     if (substr($account, 0, 4) !== '0000') {
         return '0000' . substr($account, 0, 6);
     }
 }
Exemplo n.º 2
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators[] = new System00($bankId);
     $this->validators[] = new System04($bankId);
     $this->validators[] = new System07($bankId);
 }
Exemplo n.º 3
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators[] = new System00($bankId);
     $this->validators[0]->setWeights(array(2, 1));
     $this->validators[] = new System03($bankId);
 }
Exemplo n.º 4
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators[] = new System63($bankId);
     $this->validators[] = new System06($bankId);
     $this->validators[1]->setWeights(array(2, 3, 4, 5, 6, 7));
 }
Exemplo n.º 5
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators[] = new System01($bankId);
     $this->validators[0]->setWeights(array(3, 1, 7));
     $this->validators[0]->setEnd(2);
     $this->validators[] = new System32($bankId);
 }
Exemplo n.º 6
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators[] = new System05($bankId);
     $this->validators[0]->setWeights(array(7, 3, 1));
     $this->validators[] = new System01($bankId);
     $this->validators[1]->setWeights(array(3, 7, 1));
 }
Exemplo n.º 7
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators[] = new System77a($bankId);
     $this->validators[0]->setWeights(array(1, 2, 3, 4, 5));
     $this->validators[] = new System77a($bankId);
     $this->validators[1]->setWeights(array(5, 4, 3, 4, 5));
 }
Exemplo n.º 8
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators[] = new System00($bankId);
     $this->validators[0]->setWeights(array(2, 1));
     $this->validators[] = new System10($bankId);
     $this->validators[1]->setWeights(array(2, 3, 4, 5, 6, 7, 8, 9, 10));
 }
Exemplo n.º 9
0
 /**
  */
 protected function init($account)
 {
     parent::init($account);
     if ($this->account[2] == 9) {
         $this->validators = $this->exceptionValidators;
     } else {
         $this->validators = $this->defaultValidators;
     }
 }
Exemplo n.º 10
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators[] = new System20($bankId);
     $this->validators[0]->setWeights(array(2, 3, 4, 5, 6, 7, 8, 9, 3));
     $this->validators[] = new System29($bankId);
     $this->validator9 = new System09($bankId);
     $this->validators[] = $this->validator9;
 }
Exemplo n.º 11
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators[] = new System06($bankId);
     $this->validators[0]->setWeights(array(2, 3, 4, 5, 6, 7, 0, 0, 0));
     $this->validators[0]->setEnd(3);
     $this->validators[] = new SystemA4b($bankId);
     $this->validators[] = new System06($bankId);
     $this->validators[2]->setWeights(array(2, 3, 4, 5, 6, 0, 0, 0, 0));
     $this->validators[2]->setEnd(4);
     $this->validators[] = new System93($bankId);
 }
Exemplo n.º 12
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     for ($i = 0; $i < 4; $i++) {
         $this->validators[] = new System06($bankId);
         $this->validators[$i]->setChecknumberPosition(6);
         $this->validators[$i]->setStart(5);
     }
     $this->validators[0]->setWeights(array(2, 3, 4, 5, 6, 7));
     $this->validators[1]->setWeights(array(7, 6, 5, 4, 3, 2));
     $this->validators[2]->setWeights(array(2, 3, 4, 0, 5, 6, 7, 8, 9, 10));
     $this->validators[3]->setWeights(array(2, 4, 8, 5, 10, 9));
     $this->validators[2]->setStart(-1);
 }
Exemplo n.º 13
0
 public function isValid($account)
 {
     switch (strlen($account)) {
         case 10:
             return $account[3] == 9 && $this->validator10->isValid($account);
         case 9:
             if ($account >= 400000000 && $account <= 499999999) {
                 return false;
             }
         case 6:
         case 7:
         case 8:
         case 9:
             return parent::isValid($account);
         default:
             return false;
     }
 }
Exemplo n.º 14
0
 protected function init($account)
 {
     parent::init($account);
     $this->validators = substr($this->account, 2, 2) == 99 ? $this->exceptionValidators : $this->defaultValidators;
 }
Exemplo n.º 15
0
 protected function init($account)
 {
     parent::init($account);
     $this->validators = $this->account[2] == 9 ? array($this->modeF) : $this->defaultValidators;
 }
Exemplo n.º 16
0
 protected function init($account)
 {
     parent::init($account);
     $this->validators = $this->account[2] == 9 ? $this->exceptionValidators : $this->defaultValidators;
 }
Exemplo n.º 17
0
 public function isValid($account)
 {
     return parent::isValid($account) || Math::isBetween($account, 1300000, 99399999);
 }
Exemplo n.º 18
0
 public function isValid($account)
 {
     return $account >= 9300000000 && $account <= 9399999999 || parent::isValid($account);
 }
Exemplo n.º 19
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators = array(new System00($bankId), new System01($bankId));
 }