All Projects → fruitl00p → Php Mt940

fruitl00p / Php Mt940

Licence: mit
A mt940 parser in PHP

Labels

Projects that are alternatives of or similar to Php Mt940

Method log
Trace the history of an individual method in a git repository (experimental)
Stars: ✭ 73 (-8.75%)
Mutual labels:  parser
Mimekit
A .NET MIME creation and parser library with support for S/MIME, PGP, DKIM, TNEF and Unix mbox spools.
Stars: ✭ 1,214 (+1417.5%)
Mutual labels:  parser
Rs Monkey Lang
Monkey Programming Language written in Rust.
Stars: ✭ 80 (+0%)
Mutual labels:  parser
Sequential
An environment to visualize JavaScript code execution in a browser
Stars: ✭ 74 (-7.5%)
Mutual labels:  parser
Cat
Plain C library for parsing AT commands for use in host devices.
Stars: ✭ 77 (-3.75%)
Mutual labels:  parser
Spintax
A Python module for parsing spintax, unlike any other module this works with nested spintax and also allows the user to escape the special characters used in its syntax.
Stars: ✭ 78 (-2.5%)
Mutual labels:  parser
Gw2 Elite Insights Parser
Binary parser for the .evtc files that arcdps generates after a boss encounter. This will generate a .html file where the results can be easily reviewed.
Stars: ✭ 73 (-8.75%)
Mutual labels:  parser
Mini Yaml
Single header YAML 1.0 C++11 serializer/deserializer.
Stars: ✭ 79 (-1.25%)
Mutual labels:  parser
Lang C
Lightweight C parser for Rust
Stars: ✭ 77 (-3.75%)
Mutual labels:  parser
F90nml
A Python module and command line tool for working with Fortran namelists
Stars: ✭ 79 (-1.25%)
Mutual labels:  parser
Any23
Apache Anything To Triples (Any23) is a library, a web service and a command line tool that extracts structured data in RDF format from a variety of Web documents.
Stars: ✭ 74 (-7.5%)
Mutual labels:  parser
Gutenberg Parser Rs
An experimental Rust parser for WordPress Gutenberg post format
Stars: ✭ 76 (-5%)
Mutual labels:  parser
Solidity Antlr4
Solidity grammar for ANTLR4
Stars: ✭ 79 (-1.25%)
Mutual labels:  parser
Parser
Generate a JSON documentation for a SFC Vue component. Contribute: https://gitlab.com/vuedoc/parser#contribute
Stars: ✭ 74 (-7.5%)
Mutual labels:  parser
Expostal
Elixir binding for Libpostal - a library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data.
Stars: ✭ 80 (+0%)
Mutual labels:  parser
Xmlparser
A low-level, pull-based, zero-allocation XML 1.0 parser.
Stars: ✭ 73 (-8.75%)
Mutual labels:  parser
Marko
A markdown parser with high extensibility.
Stars: ✭ 77 (-3.75%)
Mutual labels:  parser
Lodestone Nodejs
Character tracking and parser library for nodejs
Stars: ✭ 81 (+1.25%)
Mutual labels:  parser
Unmix
Undo the so-called mix lingo, a code-mixing style (Bahasa Jaksel)
Stars: ✭ 81 (+1.25%)
Mutual labels:  parser
Videoparse
这个可能不再维护了,音乐可以参考KMusic
Stars: ✭ 79 (-1.25%)
Mutual labels:  parser

Latest Stable Version Total Downloads License

Scrutinizer Quality Score Build Status wercker status

php-mt940?

The php-mt940 package provides a lightweight parser for MT940 format which is used by SWIFT. The output is transformed into easy to use dataclasses Transaction_banking which itself contains Statement_banking objects. Pretty straight forward.

Requirements

  • At least PHP 7

Installation

If composer is not yet on your system, follow the instructions on getcomposer.org to do so.

To add this dependency to your project, simply run the following command from the root of your project:

composer require kingsquare/php-mt940

This ensures that you install the latest stable release.

How to use the parser?

I've attached a simple script in the examples directory to explain it a bit more in detail, but after loading the required classes, the usage should be pretty simple:

<?php
// ... load everything ... //

// instantiate the actual parser
// and parse them from a given file, this could be any file or a posted string
$parser = new \Kingsquare\Parser\Banking\Mt940();
$tmpFile = __DIR__.'/test.mta';
$parsedStatements = $parser->parse(file_get_contents($tmpFile));
?>

Included engines

Currently the following engines are included:

Custom engines

To override engines or just try a one-off engine on a file, you can pass an engine into the parse-method:

<?php
// ... load everything ... //

class MyCustomMt940Engine extends \Kingsquare\Parser\Banking\Mt940\Engine {
    // add your overrides / overloads and custom logic here
}

// instantiate the actual parser
// and parse them from a given file, this could be any file or a posted string
$parser = new \Kingsquare\Parser\Banking\Mt940();
$engine = new MyCustomMt940Engine();
$tmpFile = __DIR__.'/test.mta';
$parsedStatements = $parser->parse(file_get_contents($tmpFile), $engine);
?>

Known issues

I've provided unittests but please take a look at the github issue tracker for the latest ideas's, issues or other stuff..

Future plans

I do intend to add new engines or keep everything running smoothly, but since i don't have access to any more test files, it's hard to add new engines ;) The unknown engine should work or atleast give some idea as to where different banks diverge from the standard. If you do have any ideas, examples or new banks that you'd like to see incorporated, please don't hesitate and send me an issue / pullrequest!

Contact

This is GitHub, you know where to find me :)

License

PHP-MT940 is licensed under the MIT License - see the LICENSE file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].