Coder Social home page Coder Social logo

camt's Introduction

Genkgo.CAMT

Build Status Code Quality Code Coverage Total Downloads Latest Stable Version License

Library to read CAMT files. Currently only CAMT.052, CAMT.053 and CAMT.054 are supported.

Supported Versions

Camt 052

Version Supported
camt.052.001.01 ✔️
camt.052.001.02 ✔️
camt.052.001.03
camt.052.001.04 ✔️
camt.052.001.05
camt.052.001.06 ✔️

Camt 053

Version Supported
camt.053.001.01
camt.053.001.02 ✔️
camt.053.001.03 ✔️
camt.053.001.04 ✔️
camt.053.001.05
camt.053.001.06

Camt 054

Version Supported
camt.054.001.01
camt.054.001.02 ✔️
camt.054.001.03
camt.054.001.04 ✔️
camt.054.001.05
camt.054.001.06

Installation

Requires PHP 7.0 or later. In case this is an obstacle for you, conversion should be no problem. The library is very small.

It is installable and autoloadable via Composer:

composer require genkgo/camt

Quality

To run the unit tests at the command line, run:

./vendor/bin/phpunit

This library attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request.

PHP-CS-Fixer is used to ensure PSR coding standards are respected.

To fix CS, run:

./vendor/bin/php-cs-fixer fix

A .php_cs.dist file in the root directory excludes vendor directory from fixing and contains coding standards level wanted (PSR-2).

Getting Started

Read a CAMT file, and loop through its statements and entries.

<?php
use Genkgo\Camt\Config;
use Genkgo\Camt\Reader;

$reader = new Reader(Config::getDefault());
$message = $reader->readFile(__DIR__.'/Camt053/Stubs/camt053.v2.minimal.xml');
$statements = $message->getRecords();
foreach ($statements as $statement) {
    $entries = $statement->getEntries();
}

XSD validation

This library provides a XSD validation for each supported CAMT format. The validation is executed by default. But in some cases, you might want to disable it.

<?php
use Genkgo\Camt\Config;
use Genkgo\Camt\Reader;

$config = Config::getDefault();
$config->disableXsdValidation();

$reader = new Reader($config);

Contributing

  • Found a bug? Please try to solve it yourself first and issue a pull request. If you are not able to fix it, at least give a clear description what goes wrong. We will have a look when there is time.
  • Want to see a feature added, issue a pull request and see what happens. You could also file a bug of the missing feature and we can discuss how to implement it.

camt's People

Contributors

antlih avatar bdudelsack avatar dbx12 avatar frederikbosch avatar hanishsingla avatar haycoin avatar jarnovanleeuwen avatar jonaswouters avatar liviakuenzli avatar mathieumaas avatar powerkiki avatar sdespont avatar teslina avatar tijuan avatar toooni avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.