예제 #1
0
 /**
  * Returns the bankcode of the IBAN
  *
  * @access    public
  * @return    string
  */
 function getBankcode()
 {
     if (!$this->validate()) {
         $this->_errorcode = VALIDATE_FINANCE_IBAN_GENERAL_INVALID;
         return PEAR::raiseError($this->errorMessage($this->_errorcode), $this->_errorcode, PEAR_ERROR_TRIGGER, E_USER_WARNING, $this->errorMessage($this->_errorcode) . " in VALIDATE_FINANCE_IBAN::getBankcode()");
     } else {
         $_iban_countrycode_bankcode = Validate_Finance_IBAN::_getCountrycodeBankcode();
         $currCountrycodeBankcode = $_iban_countrycode_bankcode[substr($this->_iban, 0, 2)];
         return substr($this->_iban, $currCountrycodeBankcode['start'], $currCountrycodeBankcode['length']);
     }
 }