示例#1
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setWeights(array(2, 3, 4, 5, 6, 0, 0, 7));
     $this->setStart(-2);
     $this->setEnd(1);
 }
示例#2
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setWeights(array(6, 5, 4, 3, 2, 1));
     $this->setStart(1);
     $this->setEnd(6);
 }
示例#3
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setWeights(array(1, 2));
     $this->setStart(0);
     $this->setEnd(-2);
 }
示例#4
0
 public function isValid($account)
 {
     try {
         return strlen($account) == 10 && $account[0] == 9 ? $this->validator20->isValid($account) : parent::isValid($account);
     } catch (ValidatorESERException $e) {
         return false;
     }
 }
示例#5
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setWeights(array(1, 2));
     $this->setStart(1);
     $this->setEnd(6);
     $this->setChecknumberPosition(7);
 }
示例#6
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setWeights(array(2, 1));
     $this->setChecknumberPosition(-3);
     $this->setStart(-4);
     $this->setEnd(2);
 }
示例#7
0
 public function isValid($account)
 {
     if (parent::isValid($account)) {
         return true;
     }
     $account = ltrim($account, '0') . '00';
     return strlen($account) <= $this->normalizedSize && parent::isValid($account);
 }
示例#8
0
 public function isValid($account)
 {
     if (parent::isValid($account)) {
         return true;
     }
     if (substr($this->account, 0, 3) !== '000') {
         return false;
     }
     return parent::isValid(ltrim($account . '00', '0'));
 }
示例#9
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setWeights(array(2, 1));
     /*
      * The specification is not clear about 4 or 3.
      * see https://github.com/malkusch/bav/issues/14
      */
     $this->setEnd(3);
 }
示例#10
0
 public function init($account)
 {
     parent::init($account);
     if ($this->account[8] == 8) {
         $this->setWeights(array(2, 1, 2, 1, 2, 1, 2, 0, 1, 2));
         $this->setEnd(-1);
     } else {
         $this->setWeights(array(2, 1));
         $this->setEnd(-4);
     }
 }
示例#11
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setWeights(array(2, 3, 4, 5, 6, 7));
 }
示例#12
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setWeights(array(1, 2, 3, 4, 5, 6, 11, 10, 9));
     $this->setDivisor(11);
 }
示例#13
0
 protected function init($account)
 {
     parent::init($account);
     $this->account = preg_replace('~^([3456]|9..)?0*~', '', $this->account);
 }
示例#14
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setWeights(array(9, 8, 7, 6, 5, 4, 3, 2, 1));
 }
示例#15
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setWeights(array(2, 4, 8, 5, 10, 0, 0, 0, 0));
     $this->setDivisor(11);
 }
示例#16
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setWeights(array(2, 1));
     $this->setDivisor(10);
 }
示例#17
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setStart(-1);
     $this->setEnd(5);
 }
示例#18
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->setWeights(array(3, 7, 1));
 }