Download the PHP package jbtje/edifact without Composer
On this page you can find all versions of the php package jbtje/edifact. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jbtje/edifact
More information about jbtje/edifact
Files in jbtje/edifact
Informations about the package edifact
edifact
Tools to process EDI messages in UN/EDIFACT format
Supported syntax is version 3.
It's provided in a Composer package:
composer require jbtje/edifact
The mapping xml files are provided in a separate package:
composer require php-edifact/edifact-mapping
EDI\Parser
Given an edi message checks the syntax, outputs errors and returns the message as a multidimensional array.
INPUT
Where $x
could be:
- a url
- a string (wrapped message)
- an array of strings (a segment per entry)
OR
OUTPUT
Errors
Array
EDI\Encoder
Given a multidimensional array (formatted as the output of the parser), returns an EDI string, optionally one segment per line.
INPUT
$x
is a multidimensional array where first dimension is the EDI segment, second contains elements:
- single value
- array (representing composite elements)
$wrap
is a boolean, if you need a segment per line. Set to false to disable wrapping
OR
OUTPUT
EDI\Analyser
Create from EDI file readable structured text with comments from segments.xml
.
Requires the EDI\Mapping package.
$file
is the path to orginal EDI message file
*** Example INPUT
*** Example Output
EDI\Reader
Read from EDI file requested segment element values.
INPUT
Where X could be:
- a url
- a string (wrapped message)
- an array of strings (a segment per entry)
OR
OUTPUT Errors
Array
EDI\Interpreter
Organizes the data parsed by EDI/Parser using the xml description of the message and the xml segments.
INPUT
OUTPUT
Json
Json for interchange service segments (UNB / UNZ)
Errors (per message)
Example
Edifact
DTM+7:201309200717:203'
Array
Testing
The package should be required with composer, alongside edifact-mapping. The tests then can be run simply with phpunit in the root of the package.
Notes
Valid characters are: A-Za-z0-9.,-()/'+:=?!"%&*;<> UNECE
All versions of edifact with dependencies
ext-json Version *
ext-simplexml Version *
voku/arrayy Version ~7.1
php-edifact/edifact-mapping Version dev-master