1. Go to this page and download the library: Download jbtje/edifact library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jbtje / edifact example snippets
$c = new Parser($x);
$c = new Parser();
$c->load($file);
$c->loadString($string);
$c->errors();
$c->get();
$c = new Encoder($x, $wrap = true);
$c = new Encoder();
$c->encode($array, $wrap);
$c->get(); // returns String
$parser = new Parser($file);
$parsed = $parser->get();
$segments = $parser->getRawSegments();
$analyser = new Analyser();
$mapping = new MappingProvider('D95B');
$analyser->loadSegmentsXml($mapping->getSegments());
$analyser->loadMessageXml($mapping->getMessage('coparn'));
$analyser->loadCodesXml($mapping->getCodes());
$analyser->directory = 'D95B';
$result = $analyser->process($parsed, $segments);