Method | Description | |
---|---|---|
__construct ( string $url = null ) | Reader constructor. | |
errors ( ) | Get errors | |
getParsedFile ( ) | Returns the parsed file contained within. | |
groupsExtract ( type $start = 'LIN', type $barrier = ['UNS'] ) : boolean/array | get groups from message when last segment is unknown but you know the barrier useful for invoices by default | |
load ( $url ) : boolean | ||
preValidate ( ) : boolean | Do initial validation | |
readEdiDataValue ( array/string $filter, integer $l1, $l2 = false, boolean $required = false ) : string/null | read data value from parsed EDI data | |
readEdiDataValueReq ( $filter, $l1, boolean $l2 = false ) : string | read required value. if no found, registre error | |
readEdiSegmentDTM ( integer $PeriodQualifier ) : string | read date from DTM segment period qualifier - codelist 2005 | |
readGroups ( char $before, type $start, type $end, type $after ) : boolean/array | get groups from message | |
readTDTtransportIdentification ( $transportStageQualifier ) : string | read transport identification number | |
readUNBDateTimeOfPpreperation ( ) | ||
readUNBDateTimeOfPreperation ( ) : mixed | string | get message preparation time | |
readUNHmessageNumber ( ) : string | read message number | |
readUNHmessageType ( ) : string | read message type | |
resetErrors ( ) | reset errors | |
setParsedFile ( array $parsed_file ) : boolean | ||
splitMultiMessage ( $ediMessage ) : array | Split multi messages to separate messages |
Method | Description | |
---|---|---|
unwrap ( $string ) : array | unwrap string splitting rows on terminator (if not escaped) |
public __construct ( string $url = null ) | ||
$url | string | url or path ur EDI message |
public groupsExtract ( type $start = 'LIN', type $barrier = ['UNS'] ) : boolean/array | ||
$start | type | first segment start a new group |
$barrier | type | barrier segment (NOT in group) |
return | boolean/array |
public readEdiDataValue ( array/string $filter, integer $l1, $l2 = false, boolean $required = false ) : string/null | ||
$filter | array/string | |
$l1 | integer | first level item number (start by 1) |
$required | boolean | if required, but no exist, register error |
return | string/null |
public readEdiDataValueReq ( $filter, $l1, boolean $l2 = false ) : string | ||
$filter | string|array segment filter by segment name and values | |
$l1 | ||
$l2 | boolean | |
return | string |
public readEdiSegmentDTM ( integer $PeriodQualifier ) : string | ||
$PeriodQualifier | integer | period qualifier (codelist/2005) |
return | string | YYYY-MM-DD HH:MM:SS |
public readGroups ( char $before, type $start, type $end, type $after ) : boolean/array | ||
$before | char | segment before groups |
$start | type | first segment of group |
$end | type | last segment of group |
$after | type | segment after groups |
return | boolean/array |
public readTDTtransportIdentification ( $transportStageQualifier ) : string | ||
$transportStageQualifier | ||
return | string |
public readUNBDateTimeOfPreperation ( ) : mixed | string | ||
return | mixed | string |
public readUNHmessageNumber ( ) : string | ||
return | string |
public readUNHmessageType ( ) : string | ||
return | string |
public setParsedFile ( array $parsed_file ) : boolean | ||
$parsed_file | array | array |
return | boolean |
public static splitMultiMessage ( $ediMessage ) : array | ||
$ediMessage | string | |
return | array |