PHP Class EDI\Interpreter

Datei anzeigen Open project: sabas/edifact Class Usage Examples

Public Properties

Property Type Description
$messageTextConf

Public Methods

Method Description
__construct ( string $xmlMsg, array $xmlSeg, string $xmlSvc, array $messageTextConf = null ) Split multiple messages and process
getErrors ( ) Get errors
getJson ( $pretty = false ) Get result as json
getJsonServiceSegments ( $pretty = false ) Get json service segments
getMessages ( ) Get splitted messages
getServiceSegments ( ) Get service segments
prepare ( $parsed ) : array Split multiple messages and process
processXmlGroup ( $elm, $message, &$segmentIdx, &$array, &$errors ) Proccess an XML Group

Private Methods

Method Description
loopMessage ( $message, $xml ) : array Transform a parsed edi in its groupings
processSegment ( $segment, $xmlMap, $segmentIdx, &$errors = null ) Add human readable keys as in Analyser
processService ( $segments ) Process UNB / UNZ segments
processXmlSegment ( $elm, $message, &$segmentIdx, &$array, &$errors ) Process an XML Segment
splitMessages ( $parsed ) : array Split multiple messages

Method Details

__construct() public method

Split multiple messages and process
public __construct ( string $xmlMsg, array $xmlSeg, string $xmlSvc, array $messageTextConf = null )
$xmlMsg string Path to XML Message representation
$xmlSeg array Segments processed by EDI\Analyser::loadSegmentsXml
$xmlSvc string Service segments processed by EDI\Analyser::loadSegmentsXml
$messageTextConf array Personalisation of error messages

getErrors() public method

Get errors
public getErrors ( )

getJson() public method

Get result as json
public getJson ( $pretty = false )

getJsonServiceSegments() public method

Get json service segments
public getJsonServiceSegments ( $pretty = false )

getMessages() public method

Get splitted messages
public getMessages ( )

getServiceSegments() public method

Get service segments
public getServiceSegments ( )

prepare() public method

Split multiple messages and process
public prepare ( $parsed ) : array
$parsed An array coming from EDI\Parser
return array

processXmlGroup() public method

Proccess an XML Group
public processXmlGroup ( $elm, $message, &$segmentIdx, &$array, &$errors )

Property Details

$messageTextConf public_oe property

public $messageTextConf