Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
309 commits
Select commit Hold shift + click to select a range
2917535
BAV_VerifyImport
malkusch May 23, 2014
d100288
BAV_VerifyException*
malkusch May 23, 2014
6fbd686
BAV_TestAPI
malkusch May 23, 2014
44e4f9d
BAV_TestAPI_BAV
malkusch May 23, 2014
69da50d
BAV_TestAPI_Kontocheck
malkusch May 23, 2014
fb501fe
BAV_TestAPI_Ktoblzcheck
malkusch May 23, 2014
6da275c
BAV_TestAPIResult
malkusch May 23, 2014
5906f5a
BAV_TestAPIResult_Error
malkusch May 23, 2014
6e7a298
BAV_TestAPIException*
malkusch May 23, 2014
002dd33
BAV_Validator
malkusch May 23, 2014
d33359b
BAV_Validator_BankDependent
malkusch May 23, 2014
a8ccc2f
BAV_Validator_Chain
malkusch May 23, 2014
049c6bf
BAV_Validator_Iteration
malkusch May 23, 2014
482ae32
BAV_Validator_Iteration_Transformation
malkusch May 23, 2014
9f50917
BAV_Validator_Iteration_Weighted
malkusch May 23, 2014
77abf7e
BAV_ValidatorException*
malkusch May 23, 2014
92bf5e5
validators
malkusch May 23, 2014
259c643
Tests
malkusch May 23, 2014
a93f951
Merge pull request #15 from malkusch/PSR2
malkusch May 23, 2014
d7c8f09
renamed BAV_DataBackend::getAgencies() into getAgenciesForBank()
malkusch May 24, 2014
979d20b
added migration path for renaming the API methods in BAV_DataBackend
malkusch May 24, 2014
f7c242d
added note about migration path
malkusch May 24, 2014
0c9b92f
fixed DataConstraintTest
malkusch May 24, 2014
83b7128
removed duplicates
malkusch May 24, 2014
e1b4e6a
updated phpunit api
malkusch May 24, 2014
2bd0c74
increasing phpunit dependency to 3.6 because of assertInternalType()
malkusch May 24, 2014
a4ca0b1
added configuration container for encoding and data backend.
malkusch May 26, 2014
75aa4fd
release 0.28
malkusch May 26, 2014
331c834
readme in markdown
malkusch May 26, 2014
54fd900
added composer link
malkusch May 27, 2014
d12e5ad
introduced BAV_DataBackend::getLastUpdate()
malkusch May 27, 2014
f191a3a
added BAV_DataBackend::isInstalled()
malkusch May 27, 2014
32caaf9
added DataBackendContainer to support automatic installation
malkusch May 29, 2014
786dbea
added support for automatic update
malkusch May 30, 2014
751185d
documentation
malkusch May 30, 2014
5cb85e9
bin-install.php did install two times if configured to install automa…
malkusch May 30, 2014
0bd71d6
removed deprecated autoloder
malkusch May 30, 2014
f040c05
removed BAV_Version
malkusch May 30, 2014
dcebf38
removed class BAV
malkusch May 30, 2014
31fab8b
removed BAV_ prefix
malkusch May 30, 2014
3598af4
moved into namespace malkusch\bav
malkusch May 30, 2014
9e9479f
moved test classes into tests/classes
malkusch May 30, 2014
8931f29
removed DataBackend::_getAgencies() and DataBackend::_getMainAgency()
malkusch May 30, 2014
6fe91eb
[PSR2] renamed Validator_* into Validator
malkusch May 30, 2014
3e3409d
removed whitespace
malkusch May 30, 2014
3fe993b
added API facade BAV
malkusch May 30, 2014
f481180
added type to returned arrays
malkusch May 30, 2014
ee30f1f
renamed all classes which where not conform to PSR2
malkusch May 30, 2014
a078b92
example uses the new API
malkusch May 30, 2014
18bf5bf
note about installation
malkusch May 30, 2014
dbe1275
added new bundesbank fields to the parser
malkusch May 30, 2014
b01a3f6
added script bin/bav-uninstall.php
malkusch May 30, 2014
95e7f0e
removed executable bit
malkusch May 30, 2014
18fbf01
removed TestSuite
malkusch May 30, 2014
5a31aa3
fixed CrossProjectTest
malkusch May 30, 2014
317ff92
narrowed false positive
malkusch May 30, 2014
eac532a
disable unreliable ktocheck api
malkusch May 30, 2014
99f6ca3
added concurrency support for CrossProjectTest
malkusch May 30, 2014
8b0e8c3
removed done TODO
malkusch May 30, 2014
7e40769
fixed IBAN offsets
malkusch May 30, 2014
13e3cec
removed VerifyImport
malkusch May 30, 2014
a166978
exclude bogus validators from ktoblzcheck
malkusch May 30, 2014
4947720
fixed validator 68
malkusch May 30, 2014
e0a496e
fixed validator 78
malkusch May 30, 2014
f8002ce
testing on zero padded accounts
malkusch May 30, 2014
e644afc
fixed validator 59
malkusch May 30, 2014
150fa37
fixed validator 78
malkusch May 30, 2014
900b946
fixed validator 58
malkusch May 30, 2014
874dbcd
added travis ci
malkusch May 30, 2014
bc35a7d
using backend container for automatic installation
malkusch May 30, 2014
b9e7d89
added minor version
malkusch May 30, 2014
52ea1b0
added UpdatePlanTest into ci
malkusch May 30, 2014
bd86da6
PDO can be configured by the environment
malkusch May 30, 2014
6395181
travis PDO environment
malkusch May 30, 2014
fcc451c
fixed wrong script
malkusch May 30, 2014
6330d4f
fixing cs notices
malkusch May 30, 2014
a4336a3
CI with CS
malkusch May 30, 2014
85f563d
fixed the order of the tests to allow mocking of time()
malkusch May 30, 2014
1429fa4
more informative exception
malkusch May 30, 2014
c1c10df
fixed exception parameters and error handling in DDL statements
malkusch May 30, 2014
754a524
ignore composer files
malkusch May 30, 2014
765630e
fixed missing namespace
malkusch May 30, 2014
deaef51
run tests separately
malkusch May 30, 2014
26e329d
Revert "fixed missing namespace"
malkusch May 30, 2014
968862d
no DB tests
malkusch May 30, 2014
e3237a2
run only backendtest
malkusch May 30, 2014
8fda6ef
fixed travis.yml
malkusch May 30, 2014
75fa478
debugging commit for this annoying ci environmane
malkusch May 30, 2014
e434556
remove var_dump
malkusch May 30, 2014
cad52c0
exclude BackendTest from ci as mysql seems to go away
malkusch May 30, 2014
8483daf
get mysql info
malkusch May 31, 2014
18ae66c
try again the longer test with a tuned mysql
malkusch May 31, 2014
b2db260
run all tests in the directory
malkusch May 31, 2014
6299a0a
added FileUtil
malkusch May 31, 2014
f0f55c3
installation lock
malkusch May 31, 2014
b982cfb
PSR2 compatible
malkusch May 31, 2014
88ea1dc
non blocking update lock
malkusch May 31, 2014
371ad2b
moved safeRename() into FileUtil
malkusch May 31, 2014
c6221e5
new readme
malkusch May 31, 2014
c92d34a
added ci image
malkusch May 31, 2014
c480b48
release 0.29
malkusch Jun 1, 2014
540d52a
moved FileUtil
malkusch Jun 1, 2014
d35ffca
disable update plan in bav-update.php
malkusch Jun 1, 2014
83e75fe
removed verifyimport.php
malkusch Jun 1, 2014
44abef3
added validation of bundesbank file
malkusch Jun 1, 2014
7b6e177
fixed inheritance
malkusch Jun 1, 2014
2c8fcde
added URIPicker
malkusch Jun 1, 2014
5911302
PSR2 style
malkusch Jun 1, 2014
9d3a1e3
PSR2 style
malkusch Jun 1, 2014
00571db
added BAV::update()
malkusch Jun 1, 2014
1bc38dc
added todo list
malkusch Jun 2, 2014
f0c5397
renamed bankExists() into isValidBank()
malkusch Jun 2, 2014
8291118
moved curl download into Downloader
malkusch Jun 2, 2014
8dc8f1d
documented api methods
malkusch Jun 2, 2014
0fc8b90
added BIC
malkusch Jun 3, 2014
aa1368c
typo
malkusch Jun 3, 2014
6e264df
changed data/verify.ini to tests/data/accounts.json
malkusch Jun 6, 2014
ba3a41e
PSR2 formatting
malkusch Jun 6, 2014
7be7e68
fixed test for PHP 5.3
malkusch Jun 6, 2014
948f000
reorganized tests to reduce memory foot print
malkusch Jun 6, 2014
fdc7adb
fixed invalid phpunit call
malkusch Jun 6, 2014
6e03a23
fixed for PHP 5.3
malkusch Jun 6, 2014
39d31d8
added StatementContainer
malkusch Jun 6, 2014
5aa83f3
bootstraping tests with regular autoloader
malkusch Jun 6, 2014
03c4018
sqlite2 support fixed
malkusch Jun 6, 2014
e80f42a
updated readme documentation
malkusch Jun 6, 2014
5829229
PSR2 compliant
malkusch Jun 8, 2014
8030f09
PHP 5.6
malkusch Jun 8, 2014
b257534
removed 5.6
malkusch Jun 8, 2014
2487f40
doctrine mapping
malkusch Jun 23, 2014
393fccb
implemented installation and update
malkusch Jun 23, 2014
98c5ceb
::isInstalled(), getNewBank()
malkusch Jun 24, 2014
a6124fa
getMainAgency()
malkusch Jun 24, 2014
a866120
getAgenciesForBank()
malkusch Jun 24, 2014
423bd15
getAllBanks()
malkusch Jun 24, 2014
c60c004
getBICAgencies()
malkusch Jun 24, 2014
889ff74
index on bic
malkusch Jun 24, 2014
9cd4c92
MetaData and last modified
malkusch Jun 24, 2014
ec36b2a
harmonized PDO backend with ORM backend
malkusch Jun 24, 2014
ab8aded
fix some methods
malkusch Jun 24, 2014
c8411c1
fix orm update
malkusch Jun 24, 2014
9ed2188
added license
malkusch Jun 24, 2014
f5ea274
clarified method signature
malkusch Jun 24, 2014
2aab4e0
removed unused use
malkusch Jun 24, 2014
a0bcae2
added doctrine into backend test
malkusch Jun 24, 2014
0072564
add doctrine/orm into README
malkusch Jun 24, 2014
7f6efef
call em->clear() after uninstall()
malkusch Jun 24, 2014
88773e9
changelog
malkusch Jun 24, 2014
d24f4c9
fixed backend test
malkusch Jun 24, 2014
7a0ca62
release 0.29
malkusch Jun 1, 2014
8139351
reduced memory foot print
malkusch Jun 24, 2014
b384bda
increase mysql packet timeout for CI
malkusch Jun 24, 2014
c5c02cd
added DataBackend::free() for less memory consumption during tests
malkusch Jun 24, 2014
732b903
documented api
malkusch Jun 24, 2014
f3b711e
fixed wrong namespace for LogicException
malkusch Jun 24, 2014
41b2304
decrease memory in test
malkusch Jun 24, 2014
9c838cb
fixed test for PHP 5.3
malkusch Jun 24, 2014
c326b5e
decreased memory usage drastically
malkusch Jun 24, 2014
82cb50f
added SQLDataBackend
malkusch Jun 24, 2014
962ef19
fix for PHP 5.3
malkusch Jun 25, 2014
7e15ad2
added callbacks for PHP's filter validation
malkusch Jun 25, 2014
620dd1d
edited api documentation
malkusch Jun 25, 2014
d106970
release 1.0.0
malkusch Jun 25, 2014
9a7e9db
added filter example
malkusch Jun 25, 2014
356f78f
added php 5.2 into CI
malkusch Jun 25, 2014
2252d98
added donations link
malkusch Jun 25, 2014
59df2e3
edited donate text as github won't print a bitcoin: URI
malkusch Jun 25, 2014
dc2ba13
semantic typo
malkusch Jun 25, 2014
0b4e2d5
edited CI image
malkusch Jun 29, 2014
0b7819c
bav/data should be writable
malkusch Jun 29, 2014
d91f983
typo
malkusch Jun 29, 2014
b276390
parallel unit tests
malkusch Jun 29, 2014
a11bb63
Revert "parallel unit tests"
malkusch Jun 29, 2014
35c45a0
edited documentation
malkusch Jun 30, 2014
a35020e
swaped configuration location into tested ConfigurationLocator
malkusch Jun 30, 2014
f6ef775
test configuration initialization of ConfigurationRegistry
malkusch Jun 30, 2014
1c528d7
version-0 documentation
malkusch Jun 30, 2014
3b99f48
test Lock
malkusch Jun 30, 2014
5f61ad1
removed shutdown hook
malkusch Jun 30, 2014
d699af6
TODO BIC index for FileDataBackend
malkusch Jun 30, 2014
a310c3e
replaced bav's binary search with malkusch/php-index
malkusch Jun 30, 2014
20bbf10
switch to php-index master
malkusch Jun 30, 2014
7c6e67e
api references
malkusch Jul 1, 2014
28e3385
added the backend container to the api
malkusch Jul 1, 2014
dec5730
added the backend container to the api
malkusch Jul 1, 2014
42e21b4
removed legacy code for loading a type validator
malkusch Jul 2, 2014
6b0f693
added ValidatorFactory
malkusch Jul 2, 2014
a0465c9
removed unused test
malkusch Jul 2, 2014
02b0e7a
Validator::isValid() raises an E_USER_WARNING if the parameter $account
malkusch Jul 2, 2014
3f3972d
removed unused method
malkusch Jul 2, 2014
407d213
PSR2
malkusch Jul 3, 2014
c424d56
fixed a bug in FileParser which did hide the last line in the file of…
malkusch Jul 3, 2014
d7c7ae5
removed unused method
malkusch Jul 3, 2014
20b23d1
added test for completeness
malkusch Jul 3, 2014
15c858a
test FileParser::readLine()
malkusch Jul 4, 2014
8209bfc
read first line without length limit
malkusch Jul 5, 2014
5e43207
Merge branch 'php-index'
malkusch Jul 5, 2014
9f58b1f
updated php-index version
malkusch Jul 5, 2014
f99757c
changed to WTFP License
malkusch Aug 23, 2014
f25a63a
PHP 5.6 deprecated the iconv_* methods
malkusch Oct 11, 2014
7c7f074
Fix issue with multiple autoloader declarations. See https://github.c…
malkusch Oct 26, 2014
a9b17b0
fixed composers archive exclusion option
malkusch Dec 1, 2014
981cf34
[PR18] Adding test cases for Validator74 and Validator66.
malkusch Jan 13, 2015
5277264
fix for Validator 74
VasuLief Jan 12, 2015
d555a94
[PR18] Fix Validator74 for e.g. 15 - 5 = 10.
malkusch Jan 13, 2015
7e77580
[PSR2] fix code style.
malkusch Jan 13, 2015
e1fbef7
remove changelog in favor to git log
malkusch Jan 13, 2015
58af5f5
Validator 08 considers accounts below 60000 as valid
malkusch Mar 19, 2015
703f1a0
moved api documentation into api/ as apigen would delete everything (…
malkusch Mar 20, 2015
162dbfc
Cache composer in CI
malkusch Mar 25, 2015
8e8c470
using SPDX identifier
malkusch Mar 26, 2015
cb22960
use travis' container infrastructure
malkusch Apr 3, 2015
9c3abee
drop PHP-5.3 support
malkusch Apr 3, 2015
433509d
fix CI
malkusch Apr 3, 2015
4dcac26
added E2
malkusch Apr 4, 2015
8ae35a5
update version in documentation
malkusch Apr 4, 2015
169b218
Update Readme to use UTF8 on PDO connection
schmidex Apr 25, 2015
88417c2
update dependencies
malkusch May 16, 2015
6de76f1
[#25] Implement method D for validator 87
malkusch Jul 5, 2015
69b10f4
Merge pull request #24 from schmidex/patch-1
malkusch Jul 5, 2015
2ad288c
fix new PSR-2 coding standards
malkusch Jul 5, 2015
8950e87
fix bav autoloading
Dec 15, 2015
e676c56
rename package
Dec 15, 2015
d50a38e
fixed URIPicker
Apr 26, 2016
659afd3
Merge pull request #1 from bmdevel/fixed-url-picker
bmdevel Apr 26, 2016
588a486
Fix DOMURIPicker
bmdevel Dec 22, 2016
3cb519b
moved php-index dependency
Jan 19, 2018
158da0b
fix: use bmdevel/php-index 0.2
Jan 19, 2018
0b5a696
updates bundesbank file uri
bmdevel Jun 13, 2018
90781e6
BM-87689 [feat]: E3 and E4 validator
Jul 26, 2018
c263ab9
BM-87689 [feat]: link travis bmdevel
Jul 26, 2018
6bd26ef
PMG-84 [fix] rename method name; remove double underscore to avoid is…
Sep 19, 2018
5c03586
PMG-86 [fix] update composer dependencies
Sep 19, 2018
62c9b39
BM-88487 [fix] update Bundesbank uri and parsing.
Oct 30, 2018
2b25388
NO-TICKET: update url and follow redirects
May 17, 2019
388ab17
Update .travis.yml
bmdevel Nov 14, 2019
f093428
Update .travis.yml
bmdevel Nov 14, 2019
7bf58ef
Update .travis.yml
bmdevel Nov 14, 2019
340e758
Update ValidatorE4Test.php
bmdevel Nov 14, 2019
1a30ec3
Update composer.json
bmdevel Nov 14, 2019
915ab5e
updates composer.lock
Nov 14, 2019
d1edab3
upgrades phpunit
Nov 14, 2019
07d7cf4
Fixed all automatically fixable PHP7.4 errors with phpcbf
Aug 26, 2020
03c6608
chore: provide php8 compatibility, curl_init returns CurlHandle inste…
Mar 9, 2023
245f5ea
fix: select download uri by name as date formats might be dynamic
bmdevel Aug 21, 2023
818c35d
Revert to the original license which is WTFPL.
mrcgrtz Aug 28, 2023
5e16e4f
Fix class names casing
Feb 28, 2024
bf601a0
Added missing file extension
Feb 28, 2024
08a56b9
Update InstantAutoloader.php
bmdevel Feb 28, 2024
aaa9bb2
Skip calling custom constructor if class does not exist
Feb 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ nbproject
.settings
.buildpath
.project
.idea
vendor
docs/todo
30 changes: 30 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
language: php

sudo: false

php:
- 7.3
- 7.2

services:
- mysql

cache:
directories:
- $HOME/.composer/cache

env: PDO_DSN="mysql:host=localhost;dbname=bav" PDO_USER=travis

install:
- composer require squizlabs/php_codesniffer

before_script:
- mysql -e 'SET @@GLOBAL.wait_timeout=1200'
- mysql -e 'create database bav;'
- php tests/bin/test-install.php

script:
- vendor/bin/phpunit tests/unit/
- vendor/bin/phpunit --exclude-group large tests/unit-large/
- vendor/bin/phpcs --standard=PSR2 classes/ bin/ docs/example.php tests/classes/ tests/bin/ tests/bootstrap.php

13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.
135 changes: 0 additions & 135 deletions README

This file was deleted.

198 changes: 198 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
# About BAV

BAV (bank account validator) is a validation library for German bank accounts. Its based among other things on https://www.bundesbank.de/Redaktion/DE/Downloads/Aufgaben/Unbarer_Zahlungsverkehr/pruefzifferberechnungsmethoden.pdf?__blob=publicationFile


# Installation

Use [Composer](https://getcomposer.org/):

```json
{
"require": {
"malkusch/bav": "^1"
}
}
```

# Configuration

You can use BAV out of the box. BAV comes with a ready to play default
configuration ([`DefaultConfiguration`](http://bav-php.github.io/bav/api/class-malkusch.bav.DefaultConfiguration.html)):

* `UTF-8` encoding (if supported)

* [`FileDataBackendContainer`](http://bav-php.github.io/bav/api/class-malkusch.bav.FileDataBackendContainer.html).
I.e. it uses binary search on the file from the Bundesbank.
Note that this data backend uses the directory `bav/data` for install and update
operations. You have to make sure that this directory is writable.

* automatic installation. You don't have to call any installation
script. The container will download the Bundesbank file upon the first execution.

* update plan which triggers an E_USER_NOTICE if the Bundesbank file
is outdated.

You can define your own configuration by calling
[`ConfigurationRegistry::setConfiguration()`](http://bav-php.github.io/bav/api/class-malkusch.bav.ConfigurationRegistry.html#_setConfiguration)
or preferably creating the file `bav/configuration.php` which returns a
[`Configuration`](http://bav-php.github.io/bav/api/class-malkusch.bav.Configuration.html) object:

```php
namespace malkusch\bav;

$configuration = new DefaultConfiguration();

$pdo = new \PDO("mysql:host=localhost;dbname=test;charset=UTF8");
$configuration->setDataBackendContainer(new PDODataBackendContainer($pdo));

$configuration->setUpdatePlan(new AutomaticUpdatePlan());

return $configuration;
```


# Update

The Bundesbank releases new files for March, June, September and December.
BAV needs those new files. You have several possiblities to update bav:

## Script

Call `bin/bav-update.php`.

## Programmatically

```php
use malkusch\bav\BAV;

$bav = new BAV();
$bav->update();
```

## Automatic

Enable automatic updates with
[`AutomaticUpdatePlan`](http://bav-php.github.io/bav/api/class-malkusch.bav.AutomaticUpdatePlan.html)
in your `bav/configuration.php`:

```php
namespace malkusch\bav;

$configuration = new DefaultConfiguration();
$configuration->setUpdatePlan(new AutomaticUpdatePlan());

return $configuration;
```
This automatic update plan will perform long running update operations as a shutdown
hook. I.e. it won't bother users during normal operations.


# Usage

You can use BAV with the api facade
[`BAV`](http://bav-php.github.io/bav/api/class-malkusch.bav.BAV.html):

* [`BAV::isValidBank($bankID)`](http://bav-php.github.io/bav/api/class-malkusch.bav.BAV.html#_isValidBank):
Returns true for existing bank ids.

* [`BAV::isValidBankAccount($bankID, $account)`](http://bav-php.github.io/bav/api/class-malkusch.bav.BAV.html#_isValidBankAccount):
Returns true for existing accounts of an existing bank.

* [`BAV::isValidAccount($account)`](http://bav-php.github.io/bav/api/class-malkusch.bav.BAV.html#_isValidAccount):
This method validates an account against the bank of the last `isValidBank()` call.

* [`BAV::getValidBankFilterCallback()`](http://bav-php.github.io/bav/api/class-malkusch.bav.BAV.html#_getValidBankFilterCallback):
Returns a callback for filter bank validation.

* [`BAV::getValidAccountFilterCallback()`](http://bav-php.github.io/bav/api/class-malkusch.bav.BAV.html#_getValidAccountFilterCallback):
Returns a callback for filter account validation. The account filter needs
to be called after the bank filter.

* [`BAV::getMainAgency()`](http://bav-php.github.io/bav/api/class-malkusch.bav.BAV.html#_getMainAgency):
Returns the main agency of a bank.

* [`BAV::getAgencies()`](http://bav-php.github.io/bav/api/class-malkusch.bav.BAV.html#_getAgencies):
Returns further agencies. The main agency is not included in this list.
This list can be empty.

An [`Agency`](http://bav-php.github.io/bav/api/class-malkusch.bav.Agency.html)
object has the fields:

* [`Agency::getBIC()`](http://bav-php.github.io/bav/api/class-malkusch.bav.Agency.html#_getBIC)

* [`Agency::getPostcode()`](http://bav-php.github.io/bav/api/class-malkusch.bav.Agency.html#_getPostcode)

* [`Agency::getCity()`](http://bav-php.github.io/bav/api/class-malkusch.bav.Agency.html#_getCity)

* [`Agency::getName()`](http://bav-php.github.io/bav/api/class-malkusch.bav.Agency.html#_getName)

* [`Agency::getShortTerm()`](http://bav-php.github.io/bav/api/class-malkusch.bav.Agency.html#_getShortTerm)

* [`Agency::getPAN()`](http://bav-php.github.io/bav/api/class-malkusch.bav.Agency.html#_getPAN)

## Example

```php
use malkusch\bav\BAV;

$bav = new BAV();
$bankID = "10000000";
$account = "1234567890"

// check for a bank
var_dump(
$bav->isValidBank($bankID)
);

// check for a bank account
var_dump(
$bav->isValidBankAccount($bankID, $account)
);

// filter validation
var_dump(
filter_var($bankID, FILTER_CALLBACK, $bav->getValidBankFilterCallback()),
filter_var($account, FILTER_CALLBACK, $bav->getValidAccountFilterCallback())
);

// Get informations about a bank
$agency = $bav->getMainAgency($bankID);
echo "{$agency->getName()} {$agency->getCity()}\n";
```
See also `bav/docs/example.php`.


# Optional Dependencies

You may have:

* **CURL**: If you provide `bav/data/banklist.txt` you don't need CURL.

* **mbstring**: BAV works with unicode encoding. Your PHP must have support compiled
in the `mb_*` functions. If these functions are missing BAV works only with the ISO-8859-15 encoding.

* **PDO**: If you intend to use a DBS you need to use
[`PDODataBackendContainer`](http://bav-php.github.io/bav/api/class-malkusch.bav.PDODataBackendContainer.html).
`PDODataBackendContainer` needs a `PDO` support compiled in PHP.

* **doctrine/orm**: You can use
[`DoctrineBackendContainer`](http://bav-php.github.io/bav/api/class-malkusch.bav.DoctrineBackendContainer.html)
which uses doctrine
as data backend.


# License and authors

This project is free and under the WTFPL. So do what ever you want.
But it would be nice to leave a note about the authors.

The author of the original project which gave the idea to this project is
Björn Wilmsmann. Responsable for this project is Markus Malkusch <markus@malkusch.de>.

## Donations

If you like BAV and feel generous donate a few Bitcoins here:
[1335STSwu9hST4vcMRppEPgENMHD2r1REK](bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK)

[![Build Status](https://travis-ci.org/bmdevel/bav.svg?branch=master)](https://travis-ci.org/bmdevel/bav)
Loading