Validate and calculate IBAN and BBAN codes.
| author |
Eduard Mombiela mombiela.eduard@gmail.com |
|---|---|
| version | GIT: $Id$ |
| link |
http://en.wikipedia.org/wiki/International_Bank_Account_Number |
| package |
Iban |
bbanCountriesList() : array
This method returns an array with the BBAN calculation algorithm
implemented.
The key of each element is the country code defined in ISO 3166.
array
calculate(string $country, string $bban) : array
Calculate IBAN code from BBAN code and country to which it belongs.
stringCountry of BBAN code.
stringBBAN code.
arrayarray[0]:null|string = error,
array[1]:null|string = IBAN code if array[0] is null.
checkDigits(string $iban) : integer
stringIBAN code.
integerIBAN check digits.
countriesList() : array
This method returns an array with the names of the countries.
The key of each element is the country code defined in ISO 3166.
array
sepaCountriesList() : array
This method returns an array with the names of the SEPA countries.
The key of each element is the country code defined in ISO 3166.
array
validate(string $iban) : string|null
Returns a string with the validation error. If the string returned is null the IBAN code is correct.
stringIBAN code to validate.
string|nullValidation error.
validateStructure(string $structure, string $code, integer $start) : boolean
Each structure of an IBAN code consists in smaller substructures that define the format of this and follow the conventions shown in Country class.
stringPattern structure.
stringCode to parse.
integerCode position to start parsing.
booleanTrue if structure is right.
lettersConversionTable : array
Conversion table from letters to digits to calculate the IBAN code.
| var |
|---|
array
error : array
| var |
|---|
array