Exemplo n.º 1
0
 public function isValid($account)
 {
     if (parent::isValid($account)) {
         return true;
     }
     $account = ltrim($account, '0') . '00';
     return strlen($account) <= $this->normalizedSize && parent::isValid($account);
 }
Exemplo n.º 2
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'));
 }
Exemplo n.º 3
0
 public function isValid($account)
 {
     try {
         if (strlen($account) == 10 && $account[0] == 9) {
             return $this->validator20->isValid($account);
         }
         return parent::isValid($account);
     } catch (\Exception $e) {
         return false;
     }
 }
Exemplo n.º 4
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);
     }
 }
Exemplo n.º 5
0
 public function __construct($bankId)
 {
     parent::__construct($bankId);
     $this->setWeights(array(2, 3, 4, 5, 6));
     $this->setEnd(4);
 }
Exemplo n.º 6
0
 protected function init($account)
 {
     parent::init($account);
     $this->account = preg_replace('~^([3456]|9..)?0*~', '', $this->account);
 }