2017 © Pedro Peláez
 

library comarch-edi-order

Comarch EDI Order Lib

image

webit/comarch-edi-order

Comarch EDI Order Lib

  • Thursday, February 23, 2017
  • by dbojdo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 16 % Grown

The README.md

Comarch EDI Order

This library provides the object oriented representation of the Comarch EDI Order document along with its the XML parser., (*1)

Installation

The most convenient method is using Composer. Add the following line to the required section of your composer.json, (*2)

"webit/comarch-edi-order": "^2.0.0"

Usage

XML Parser

<?php
use Doctrine\Common\Annotations\AnnotationRegistry;

// Configure the AnnotationRegistry
$autoload = include 'vendor/autoload.php'; 
AnnotationRegistry::registerLoader(array($autoload, 'loadClass'));

$xmlParserBuilder = new \Webit\Comarch\EDI\Order\Parser\XmlParserBuilder();
$xmlParserBuilder->setCacheDir(sys_get_temp_dir()); // recommended to set the cache dir for the inner Serializer

/** @var \Webit\Comarch\EDI\Order\Parser\XmlParser $xmlParser */
$xmlParser = $xmlParserBuilder->build();

$myOrder = file_get_contents('my-edi-order.xml');

/** @var \Webit\Comarch\EDI\Order\DocumentOrder $documentOrder */
$documentOrder = $xmlParser->parse($myOrder);

XML File Parser

Optionally you can wrap the XMLParser with the XMLFileParser, (*3)

<?php

/** @var \Webit\Comarch\EDI\Order\Parser\XmlParser $xmlParser */

$xmlFileParser = new \Webit\Comarch\EDI\Order\Parser\XmlFileParser($xmlParser);
$documentOrder = $xmlFileParser->parse(new \SplFileInfo('my-edi-order.xml'));

Supported document versions

The current implementation supports version 2.2 as states in the spec, (*4)

Running the tests

./vendor/bin/phpunit

The Versions

23/02 2017

dev-master

9999999-dev http://www.web-it.eu

Comarch EDI Order Lib

  Sources   Download

MIT

The Requires

 

The Development Requires

edi order comarch webit

23/02 2017

2.0.1

2.0.1.0 http://www.web-it.eu

Comarch EDI Order Lib

  Sources   Download

MIT

The Requires

 

The Development Requires

edi order comarch webit

22/02 2017

2.0.0

2.0.0.0 http://www.web-it.eu

Comarch EDI Order Lib

  Sources   Download

The Requires

 

The Development Requires

edi order comarch webit

22/02 2017

dev-2.x-dev

dev-2.x-dev http://www.web-it.eu

Comarch EDI Order Lib

  Sources   Download

The Requires

 

The Development Requires

edi order comarch webit

13/07 2015

1.0

1.0.0.0 http://www.web-it.eu

Comarch EDI Order Lib

  Sources   Download

The Requires

 

edi order comarch webit

13/07 2015

dev-1.x-dev

dev-1.x-dev http://www.web-it.eu

Comarch EDI Order Lib

  Sources   Download

The Requires

 

edi order comarch webit