AbstractSegment
in package
implements
SegmentInterface
AbstractYes
Represent a segment of an EDI message.
Table of Contents
Interfaces
- SegmentInterface
- Represent a segment of an EDI message.
Properties
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.
Properties
$code
private
string
$code
$elements
private
array<string|int, mixed>
$elements
The data elements for 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