Download the PHP package enumag/bank-statements without Composer
On this page you can find all versions of the php package enumag/bank-statements. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download enumag/bank-statements
More information about enumag/bank-statements
Files in enumag/bank-statements
Package bank-statements
Short Description The PHP library to parse bank account statements
License MIT
Informations about the package bank-statements
Bank Statements
This is a PHP library to parse bank account statements. The purpose of this library is to simplify bank statements processing
and usage in your application in more standardized way. The parser result is an instance of:
JakubZapletal\Component\BankStatement\Statement\StatementInterface
containing detail information
about a statement and an array of JakubZapletal\Component\BankStatement\Statement\Transaction\TransactionInterface
with further
information about transactions.
Supported formats/bank list
- ABO (
*.gpc
) [doc]- Česká spořitelna (CZ):
JakubZapletal\Component\BankStatement\Parser\ABO\CeskaSporitelnaCZParser
- ČSOB (CZ):
JakubZapletal\Component\BankStatement\Parser\ABOParser
- Fio banka (CZ):
JakubZapletal\Component\BankStatement\Parser\ABOParser
- GE Money Bank (CZ):
JakubZapletal\Component\BankStatement\Parser\ABOParser
- Komerční banka (CZ), alias KM format:
JakubZapletal\Component\BankStatement\Parser\ABOParser
- Raiffeisenbank (CZ):
JakubZapletal\Component\BankStatement\Parser\ABOParser
- Česká spořitelna (CZ):
- XML
- ČSOB (CZ) [doc]:
JakubZapletal\Component\BankStatement\Parser\XML\CSOBCZParser
- ČSOB (CZ) [doc]:
- CSV
Installation
Note that Bank Statements is PSR-4 compliant:
Composer
If you don't have Composer install it:
Add jakubzapletal/bank-statements
to composer.json
:
Usage
Parsing of each format is provided by a class implementing:
Thanks to the interface we can rely on two main public methods: parseFile
and parseContent
.
parseFile
expects as an argument a path to file and then processes the parsingparseContent
expects as an argument a string of content and then processes the parsing
Both methods return a class implementing:
The statement class includes transaction items, which are classes implementing:
This behaviour ensures the same approach to the parsing and results for all parsers.
All abstract classes and standard classes are easily extendable, allowing implement parsing process of any data.
The basic statement class:
implements Countable
and Iterator
, so we can call function count()
on it's instances or traverse them using foreach()
.
Keep in mind that transactions of the statements are used. If you need more functionality in the statement class,
I recommend extend this class.
Examples
The parsing:
Manipulation with the statement:
Contributing
Contributions are welcome! Please see the Contribution Guidelines.