메소드 | 설명 | |
---|---|---|
__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 |
메소드 | 설명 | |
---|---|---|
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) |
리턴 | 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 |
리턴 | string/null |
public readEdiDataValueReq ( $filter, $l1, boolean $l2 = false ) : string | ||
$filter | string|array segment filter by segment name and values | |
$l1 | ||
$l2 | boolean | |
리턴 | string |
public readEdiSegmentDTM ( integer $PeriodQualifier ) : string | ||
$PeriodQualifier | integer | period qualifier (codelist/2005) |
리턴 | 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 |
리턴 | boolean/array |
public readTDTtransportIdentification ( $transportStageQualifier ) : string | ||
$transportStageQualifier | ||
리턴 | string |
public readUNBDateTimeOfPreperation ( ) : mixed | string | ||
리턴 | mixed | string |
public readUNHmessageNumber ( ) : string | ||
리턴 | string |
public setParsedFile ( array $parsed_file ) : boolean | ||
$parsed_file | array | array |
리턴 | boolean |
public static splitMultiMessage ( $ediMessage ) : array | ||
$ediMessage | string | |
리턴 | array |