コード例 #1
0
ファイル: System93.php プロジェクト: jschaedl/bav
 /**
  * @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);
     }
 }
コード例 #2
0
ファイル: SystemC8.php プロジェクト: jschaedl/bav
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators[] = new System00($bankId);
     $this->validators[] = new System04($bankId);
     $this->validators[] = new System07($bankId);
 }
コード例 #3
0
ファイル: SystemA7.php プロジェクト: jschaedl/bav
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators[] = new System00($bankId);
     $this->validators[0]->setWeights(array(2, 1));
     $this->validators[] = new System03($bankId);
 }
コード例 #4
0
ファイル: SystemC7.php プロジェクト: jschaedl/bav
 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));
 }
コード例 #5
0
ファイル: System98.php プロジェクト: jschaedl/bav
 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);
 }
コード例 #6
0
ファイル: SystemB1.php プロジェクト: jschaedl/bav
 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));
 }
コード例 #7
0
ファイル: System77.php プロジェクト: jschaedl/bav
 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));
 }
コード例 #8
0
ファイル: SystemA3.php プロジェクト: jschaedl/bav
 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));
 }
コード例 #9
0
ファイル: System73.php プロジェクト: jschaedl/bav
 /**
  */
 protected function init($account)
 {
     parent::init($account);
     if ($this->account[2] == 9) {
         $this->validators = $this->exceptionValidators;
     } else {
         $this->validators = $this->defaultValidators;
     }
 }
コード例 #10
0
ファイル: SystemB8.php プロジェクト: jschaedl/bav
 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;
 }
コード例 #11
0
ファイル: SystemA4.php プロジェクト: jschaedl/bav
 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);
 }
コード例 #12
0
ファイル: System91.php プロジェクト: jschaedl/bav
 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);
 }
コード例 #13
0
ファイル: System68.php プロジェクト: jschaedl/bav
 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;
     }
 }
コード例 #14
0
ファイル: System85.php プロジェクト: jschaedl/bav
 protected function init($account)
 {
     parent::init($account);
     $this->validators = substr($this->account, 2, 2) == 99 ? $this->exceptionValidators : $this->defaultValidators;
 }
コード例 #15
0
ファイル: System90.php プロジェクト: jschaedl/bav
 protected function init($account)
 {
     parent::init($account);
     $this->validators = $this->account[2] == 9 ? array($this->modeF) : $this->defaultValidators;
 }
コード例 #16
0
ファイル: System87.php プロジェクト: jschaedl/bav
 protected function init($account)
 {
     parent::init($account);
     $this->validators = $this->account[2] == 9 ? $this->exceptionValidators : $this->defaultValidators;
 }
コード例 #17
0
ファイル: System96.php プロジェクト: jschaedl/bav
 public function isValid($account)
 {
     return parent::isValid($account) || Math::isBetween($account, 1300000, 99399999);
 }
コード例 #18
0
ファイル: System69.php プロジェクト: jschaedl/bav
 public function isValid($account)
 {
     return $account >= 9300000000 && $account <= 9399999999 || parent::isValid($account);
 }
コード例 #19
0
ファイル: System49.php プロジェクト: jschaedl/bav
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->validators = array(new System00($bankId), new System01($bankId));
 }