1. Go to this page and download the library: Download sebastianwalker/statement 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/ */
// FromCsv($filename, $delimiter, $known_mapping, $known_offset)
$importer = new \SebastianWalker\Statement\Importers\FromCsv("file.csv");
// Get the imported transactions
$transactions = $importer->getTransactions();
// Get the mapping used (guessed + known_mapping)
$mapping = $importer->getMapping();
/*[
"amount"=>"Amount",
"description"=>"Description",
"payer"=>"Payer/Payee",
"iban"=>"IBAN",
"date"=>"Valuta Date"
]*/
// Get the column titles usable for mapping as an array
$columns = $importer->getColumns();
// FromArray($transactions)
$importer = new \SebastianWalker\Statement\Importers\FromArray([/*Array of Transactions*/]);
// Get the imported transactions
$transactions = $importer->getTransactions();
$matcher = new \SebastianWalker\Statement\Matchers\PrefixMatcher("PFIX-");
// Get all matching entities that are referenced in a given transaction
$matches = $matcher->getEntities($transaction);
// Pass basic strings
$matcher = new \SebastianWalker\Statement\Matchers\ListMatcher(["1234","5678","9012"]);
// OR set a property which will be matched
$matcher = new \SebastianWalker\Statement\Matchers\ListMatcher([
["id"=>"1234"],
["id"=>"5678"],
["id"=>"9012"]
], "id");
// Get all matching entities that are referenced in a given transaction
$matches = $matcher->getEntities($transaction);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.