codelicious / php-coda-parser
PHP parser for Belgian CODA banking files
Installs: 257 221
Dependents: 1
Suggesters: 0
Security: 0
Stars: 42
Watchers: 11
Forks: 25
Open Issues: 6
Requires
- php: >=7.0.0
Requires (Dev)
- phpunit/phpunit: 9.*
README
PHP parser for Belgian CODA banking files
Installation
You can install Codelicious/Coda using Composer. You can read more about Composer and its main repository at
http://packagist.org. First install Composer for your project using the instructions on the
Packagist home page, then define your dependency on Codelicious/Coda in your composer.json
file.
{ "require": { "codelicious/php-coda-parser": "^2.0" } }
Or you can execute the following command in your project root to install this library:
composer require codelicious/php-coda-parser:^2.0
Demo / API
You can try the parser at https://eenvoudigfactureren.be/coda. An open API is also available at the same page if you don't feel like hosting the code yourself.
Usage
<?php use Codelicious\Coda\Parser; $parser = new Parser(); $statements = $parser->parseFile('coda-file.cod'); foreach ($statements as $statement) { echo $statement->getDate()->format('Y-m-d') . "\n"; foreach ($statement->getTransactions() as $transaction) { echo $transaction->getAccount()->getName() . ": " . $transaction->getAmount() . "\n"; } echo $statement->getNewBalance() . "\n"; }
Ports
Ports of the library to other languages: