PHP code example of enumag / bank-statements

1. Go to this page and download the library: Download enumag/bank-statements library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

enumag / bank-statements example snippets


JakubZapletal\Component\BankStatement\Parser\ParserInterface

JakubZapletal\Component\BankStatement\Statement\StatementInterface

JakubZapletal\Component\BankStatement\Statement\Transaction\TransactionInterface

JakubZapletal\Component\BankStatement\Statement\Statement

use JakubZapletal\Component\BankStatement\Parser\ABOParser;

$parser = new ABOParser();

// by path to file
$path = '/path/to/file';
$statement = $parser->parseFile($path);

// by content
$content = 'string of data';
$statement = $parser->parseContent($content);

echo count($statement); // echo count of transaction items

foreach ($statement as $transaction) {
    // do something with each transaction
}

echo $statement->getAccountNumber(); // echo an account number of the statement