Example #1
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;
     }
 }
Example #2
0
 public function __construct(Bank $bank)
 {
     parent::__construct($bank);
     $this->mode1 = new Validator20($bank);
     $this->mode1->setWeights(array(2, 3, 4, 5, 6, 7, 8, 9, 3));
     $this->mode2 = new Validator53($bank);
     $this->mode2->setWeights(array(2, 4, 8, 5, 10, 9, 7, 3, 6, 1, 2, 4));
 }