IBANCountry::IBANExample PHP Method

IBANExample() public method

public IBANExample ( )
    public function IBANExample()
    {
        return iban_country_get_iban_example($this->code);
    }

Usage Example

Exemplo n.º 1
0
# Loop through the registry's examples, validating
foreach ($countries as $countrycode) {
    # instantiate
    $myCountry = new IBANCountry($countrycode);
    # start section
    print "[{$countrycode}: " . $myCountry->Name() . "]\n";
    # output remaining country properties
    print "Is a SEPA member? ";
    if ($myCountry->IsSEPA()) {
        print "Yes";
    } else {
        print "No";
    }
    print ".\n";
    # get example iban
    $myIban = new IBAN($myCountry->IBANExample());
    # output example iban properties one by one
    print "Example IBAN: " . $myIban->HumanFormat() . "\n";
    print " - country  " . $myIban->Country() . "\n";
    print " - checksum " . $myIban->Checksum() . "\n";
    print " - bban     " . $myIban->BBAN() . "\n";
    print " - bank     " . $myIban->Bank() . "\n";
    print " - branch   " . $myIban->Branch() . "\n";
    print " - account  " . $myIban->Account() . "\n";
    # output all properties
    #$parts = $myIban->Parts();
    #print_r($parts);
    # verify
    print "\nChecking validity... ";
    if ($myIban->Verify()) {
        print "IBAN {$myIban->iban} is valid.\n";
All Usage Examples Of IBANCountry::IBANExample