Iban

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

Methods

BBAN countries list.

bbanCountriesList() : array
static

This method returns an array with the BBAN calculation algorithm implemented.
The key of each element is the country code defined in ISO 3166.

Response

array

Calculate IBAN code.

calculate(string $country, string $bban) : array
static

Calculate IBAN code from BBAN code and country to which it belongs.

Arguments

$country

string

Country of BBAN code.

$bban

string

BBAN code.

Response

array

array[0]:null|string = error,
array[1]:null|string = IBAN code if array[0] is null.

Calculate IBAN check digits.

checkDigits(string $iban) : integer
static

Arguments

$iban

string

IBAN code.

Response

integer

IBAN check digits.

Countries list.

countriesList() : array
static

This method returns an array with the names of the countries.
The key of each element is the country code defined in ISO 3166.

Response

array

SEPA countries list.

sepaCountriesList() : array
static

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.

Response

array

Validate IBAN code.

validate(string $iban) : string|null
static

Returns a string with the validation error. If the string returned is null the IBAN code is correct.

Arguments

$iban

string

IBAN code to validate.

Response

string|null

Validation error.

Validate IBAN structure.

validateStructure(string $structure, string $code, integer $start) : boolean
static

Each structure of an IBAN code consists in smaller substructures that define the format of this and follow the conventions shown in Country class.

Arguments

$structure

string

Pattern structure.

$code

string

Code to parse.

$start

integer

Code position to start parsing.

Response

boolean

True if structure is right.

Properties

Letters conversion table.

lettersConversionTable : array
static

Conversion table from letters to digits to calculate the IBAN code.

var

Type(s)

array

IBAN code errors list.

error : array
static
var

Type(s)

array