/** * Validation of an IBAN (international bankaccount number) * * @param string $iban IBAN to be validated * @access public * @since 0.1 * @return boolean true if IBAN is okay */ function iban($iban = '') { return Validate_Finance_IBAN::validate($iban); }
/** * Returns the bankaccount of the IBAN * * @access public * @return string */ function getBankaccount() { 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::getBankaccount()"); } else { $_iban_countrycode_bankaccount = Validate_Finance_IBAN::_getCountrycodeBankaccount(); $currCountrycodeBankaccount = $_iban_countrycode_bankaccount[substr($iban, 0, 2)]; return substr($this->_iban, $currCountrycodeBankaccount['start'], $currCountrycodeBankaccount['length']); } }
/** * Validation of an IBAN (international bankaccount number) * * @param string $iban IBAN to be validated * @access public * @since 0.1 * @return boolean true if IBAN is okay */ function iban($iban = '') { $validate_finance_iban = new Validate_Finance_IBAN($iban); return $validate_finance_iban->validate($iban); }