Overview

Namespaces

  • malkusch
    • bav
  • PHP

Classes

  • Agency
  • AutomaticUpdatePlan
  • BAV
  • Configuration
  • ConfigurationRegistry
  • DataBackendContainer
  • DefaultConfiguration
  • DoctrineBackendContainer
  • FileDataBackendContainer
  • LogUpdatePlan
  • PDODataBackendContainer
  • UpdatePlan
  • Overview
  • Namespace
  • Class
  • Tree

Class BAV

Facade for BAV's API.

This class provides methods for validation of German bank accounts.

If you don't inject a malkusch\bav\Configuration the facade will use the malkusch\bav\ConfigurationRegistry. The registry provides per default the malkusch\bav\DefaultConfiguration.

Namespace: malkusch\bav
License: GPL
Author: Markus Malkusch <markus@malkusch.de>
See: malkusch\bav\ConfigurationRegistry
Link: Donations
Api
Located at BAV.php
Methods summary
public
# __construct( malkusch\bav\Configuration $configuration = null )

Inject the configuration.

Inject the configuration.

If the $configuration is null the configuration from malkusch\bav\ConfigurationRegistry::getConfiguration() will be used.

See

malkusch\bav\ConfigurationRegistry
public DataBackend
# getDataBackend( )

Returns the data backend

Returns the data backend

Returns

DataBackend
public
# update( )

Updates bav with a new bundesbank file.

Updates bav with a new bundesbank file.

You might consider enabling automatic update with setting AutomaticUpdatePlan as configuration.

Throws

DataBackendException

See

malkusch\bav\AutomaticUpdatePlan
malkusch\bav\Configuration::setUpdatePlan()
public boolean
# isValidBankAccount( string $bankID, string $account )

Returns true if both the bank exists and the account is valid.

Returns true if both the bank exists and the account is valid.

Parameters

$bankID
string
$bankID
$account
string
$account

Returns

boolean

Throws

DataBackendException
for some reason the validator might not be implemented

See

malkusch\bav\BAV::isValidBank()
malkusch\bav\BAV::getBank()
Bank::isValid()
public boolean
# isValidAccount( string $account )

Returns true if the account is valid for the current context.

Returns true if the account is valid for the current context.

You have to have called isValidBank() before! If the current context is no valid bank every account will validate to true.

Parameters

$account
string
$account

Returns

boolean

Throws

InvalidContextException
isValidBank() was not called before.

See

malkusch\bav\BAV::isValidBank()
ContextValidation::isValidAccount()
public boolean
# isValidBank( string $bankID )

Returns true if a bank exists

Returns true if a bank exists

Parameters

$bankID
string
$bankID

Returns

boolean

Throws

DataBackendException

See

ContextValidation::isValidBank()
public malkusch\bav\Agency
# getMainAgency( string $bankID )

Every bank has one main agency.

Every bank has one main agency.

This agency is not included in getAgencies().

Parameters

$bankID
string
$bankID Bank id (Bankleitzahl)

Returns

malkusch\bav\Agency

Throws

DataBackendException
BankNotFoundException

See

Bank::getMainAgency()
malkusch\bav\BAV::getAgencies()
public malkusch\bav\Agency[]
# getAgencies( string $bankID )

A bank may have more agencies.

A bank may have more agencies.

The main agency is not included in this list.

Parameters

$bankID
string
$bankID Bank id (Bankleitzahl)

Returns

malkusch\bav\Agency[]

Throws

DataBackendException
BankNotFoundException
public Bank
# getBank( string $bankID )

With this method you get the Bank objects for certain IDs. Note that a call to this method with an identical id will return the same objects.

With this method you get the Bank objects for certain IDs. Note that a call to this method with an identical id will return the same objects.

Parameters

$bankID
string
$bankID

Returns

Bank

Throws

BankNotFoundException
DataBackendException

See

DataBackend::isValidBank()
public malkusch\bav\Agency[]
# getBICAgencies( string $bic )

Returns bank agencies for a given BIC.

Returns bank agencies for a given BIC.

Parameters

$bic
string
$bic BIC

Returns

malkusch\bav\Agency[]
public boolean
# isValidBIC( string $bic )

Returns if a bic is valid.

Returns if a bic is valid.

Parameters

$bic
string
$bic BIC

Returns

boolean
public array
# getValidBankFilterCallback( )

Returns the third call back parameter for filter_var() for validating a bank.

Returns the third call back parameter for filter_var() for validating a bank.

filter_var($bankID, FILTER_CALLBACK, $bav->getValidBankFilterCallback());

Returns

array

See

malkusch\bav\BAV::isValidBank()
filter_var()
public array
# getValidAccountFilterCallback( )

Returns the third call back parameter for filter_var() for validating a bank account.

Returns the third call back parameter for filter_var() for validating a bank account.

filter_var($account, FILTER_CALLBACK, $bav->getValidBankFilterCallback());

Returns

array

See

malkusch\bav\BAV::isValidAccount()
filter_var()
API documentation generated by ApiGen 2.8.0