beccha / ofxparser
OFX file parser
Requires
- php: ~7.4|^8.0|^8.1
- ext-libxml: *
- ext-mbstring: *
- ext-simplexml: *
- ext-xmlwriter: *
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ~9.6
- spaze/phpstan-disallowed-calls: ^2.15 || ^3.0
- squizlabs/php_codesniffer: ~3.7
- dev-master
- v2.1.0
- v2.0.1
- v2.0.0
- dev-dependabot/composer/phpstan/phpstan-1.11.4
- dev-dependabot/composer/phpstan/phpstan-1.11.2
- dev-dependabot/composer/squizlabs/php_codesniffer-3.10.1
- dev-develop
- dev-dependabot/composer/spaze/phpstan-disallowed-calls-3.4.0
- dev-dependabot/docker/php-8.3-fpm-alpine
- dev-dependabot/composer/sebastian/resource-operations-3.0.4
This package is auto-updated.
Last update: 2024-06-07 10:45:09 UTC
README
This is a fork of oriatec/ofxparser. However, the compatibilty with this library was not preserved.
OFX Parser is a PHP library designed to parse an OFX file downloaded from a financial institution into simple PHP objects.
Here are the OFX Specifications.
Installation
Simply require the package using Composer:
$ composer require beccha/ofxparser
Usage
You can access the nodes in your OFX file as follows:
$ofxParser = new \Beccha\OfxParser\Parser(); $ofx = $ofxParser->loadFromFile('/path/to/your/bankstatement.ofx'); $bankAccounts = $ofx->getBankAccounts(); $firstBankAccount = $bankAccounts[0]; // Get the statement start and end dates $startDate = $firstBankAccount->getStatement()->getStartDate(); $endDate = $firstBankAccount->getStatement()->getEndDate(); // Get the statement transactions for the account $transactions = $firstBankAccount->getStatement()->getTransactions();
Contribute
Requirements
You must have docker installed on your system.
Installation
Clone this repository on your system
git clone https://github.com/beccha/ofxparser.git
Start and build a docker container with php7.4:
make start
Deploy Composer packages:
make init
Launch unit tests:
make unit
Other commands
Access shell:
make shell
Please make sure to check the quality of your code before submitting a pull request:
make quality-check
Full list of commands in the Makefile at the root of the project.
Fork & Credits
This is a fork of oriatec/ofxparser, itself forked of okonst/ofxparser, asgrim/ofxparser. Intended to be framework independent.
Loosely based on the ruby ofx-parser by Andrew A. Smith.