Segment
extends AbstractSegment
in package
FinalYes
Represent a segment of an EDI message.
Table of Contents
Methods
- __construct() : mixed
- Create a new instance.
- getAllElements() : array<string|int, mixed>
- Get all the elements from the segment.
- getElement() : mixed
- Get an element from the segment.
- getSegmentCode() : string
- Get the code of this segment.
Methods
__construct()
Create a new instance.
public
__construct(string $code, mixed ...$elements) : mixed
Parameters
- $code : string
-
The code of the segment.
- $elements : mixed
-
The data elements for this segment.
getAllElements()
Get all the elements from the segment.
public
getAllElements() : array<string|int, mixed>
Return values
array<string|int, mixed>getElement()
Get an element from the segment.
public
getElement(int $key) : mixed
Parameters
- $key : int
Return values
mixed —Returns null if the element does not exist
getSegmentCode()
Get the code of this segment.
public
getSegmentCode() : string