26 $sIBAN = strtoupper( trim( $sIBAN ) );
64 $this->_aCodeLengths = $aCodeLengths;
92 $iActualLength =
getStr()->strlen( $sIBAN );
96 return !is_null( $iCorrectLength ) && $iActualLength === $iCorrectLength;
109 $sCountryCode =
getStr()->substr( $sIBAN, 0, 2 );
111 $iCorrectLength = ( isset ( $aIBANRegistry[$sCountryCode] ) ) ? $aIBANRegistry[$sCountryCode] : null;
113 return $iCorrectLength;
141 $sInitialChars = $oStr->substr( $sIBAN, 0, 4 );
142 $sIBAN = $oStr->substr( $sIBAN, 4 );
143 $sIBAN = $sIBAN . $sInitialChars;
156 $aReplaceArray = array(
185 $sIBAN = str_replace(
186 array_keys( $aReplaceArray ),
204 $sModulus = bcmod( $sIBAN, self::IBAN_ALGORITHM_MOD_VALUE );
205 if ( (
int) $sModulus != 1 ) {
220 return is_array( $aCodeLengths ) && !empty( $aCodeLengths );
232 foreach ( $aCodeLengths as $sCountryAbbr => $iLength ) {
255 return (
int) preg_match(
"/^[A-Z]{2}$/", $sCountryAbbr ) !== 0;
267 return is_numeric( $iLength ) && (int) preg_match(
"/\./", $iLength ) !== 1;