Characters
in package
implements
CharactersInterface
Handle the control characters used in EDI messages.
Table of Contents
Interfaces
- CharactersInterface
- Handle the control characters used in EDI messages.
Properties
- $componentSeparator : string
- $dataSeparator : string
- $decimalPoint : string
- $escapeCharacter : string
- $includeUNASegment : bool
- $reservedSpace : string
- $segmentTerminator : string
Methods
- getComponentSeparator() : string
- Get the control character used to separate components.
- getDataSeparator() : string
- Get the control character used to separate data elements.
- getDecimalPoint() : string
- Get the control character used as a decimal point.
- getEscapeCharacter() : string
- Get the control character used as an escape character.
- getReservedSpace() : string
- Get the control character used as the reserved space.
- getSegmentSeparator() : string
- Get the character used to separate segment tags from their data components.
- getSegmentTerminator() : string
- Get the control character used as a segment terminator.
- includesUNASegment() : bool
- Check whether the UNA segment should be part of the message or not.
- withComponentSeparator() : CharactersInterface
- Set the control character used to separate components.
- withDataSeparator() : CharactersInterface
- Set the control character used to separate data elements.
- withDecimalPoint() : CharactersInterface
- Set the control character used as a decimal point.
- withEscapeCharacter() : CharactersInterface
- Set the control character used as an escape character.
- withReservedSpace() : CharactersInterface
- Set the control character used as the reserved space.
- withSegmentTerminator() : CharactersInterface
- Set the control character used as a segment terminator.
- withUNASegment() : self
- Set whether the UNA segment should be part of the message or not.
- withControlCharacter() : CharactersInterface
- Set a control character.
Properties
$componentSeparator
private
string
$componentSeparator
= ":"
The control character used to separate components.
$dataSeparator
private
string
$dataSeparator
= "+"
The control character used to separate data elements.
$decimalPoint
private
string
$decimalPoint
= ","
The control character used as a decimal point.
$escapeCharacter
private
string
$escapeCharacter
= "?"
The control character used as an escape character.
$includeUNASegment
private
bool
$includeUNASegment
= true
Whether we should include the UNA segment or not.
$reservedSpace
private
string
$reservedSpace
= " "
The reserved space.
$segmentTerminator
private
string
$segmentTerminator
= "'"
The control character used as an segment terminator.
Methods
getComponentSeparator()
Get the control character used to separate components.
public
getComponentSeparator() : string
Return values
stringgetDataSeparator()
Get the control character used to separate data elements.
public
getDataSeparator() : string
Return values
stringgetDecimalPoint()
Get the control character used as a decimal point.
public
getDecimalPoint() : string
Return values
stringgetEscapeCharacter()
Get the control character used as an escape character.
public
getEscapeCharacter() : string
Return values
stringgetReservedSpace()
Get the control character used as the reserved space.
public
getReservedSpace() : string
Return values
stringgetSegmentSeparator()
Get the character used to separate segment tags from their data components.
public
getSegmentSeparator() : string
Return values
stringgetSegmentTerminator()
Get the control character used as a segment terminator.
public
getSegmentTerminator() : string
Return values
stringincludesUNASegment()
Check whether the UNA segment should be part of the message or not.
public
includesUNASegment() : bool
Return values
boolwithComponentSeparator()
Set the control character used to separate components.
public
withComponentSeparator(string $character) : CharactersInterface
Parameters
- $character : string
Return values
CharactersInterfacewithDataSeparator()
Set the control character used to separate data elements.
public
withDataSeparator(string $character) : CharactersInterface
Parameters
- $character : string
Return values
CharactersInterfacewithDecimalPoint()
Set the control character used as a decimal point.
public
withDecimalPoint(string $character) : CharactersInterface
Parameters
- $character : string
Return values
CharactersInterfacewithEscapeCharacter()
Set the control character used as an escape character.
public
withEscapeCharacter(string $character) : CharactersInterface
Parameters
- $character : string
Return values
CharactersInterfacewithReservedSpace()
Set the control character used as the reserved space.
public
withReservedSpace(string $character) : CharactersInterface
Parameters
- $character : string
Return values
CharactersInterfacewithSegmentTerminator()
Set the control character used as a segment terminator.
public
withSegmentTerminator(string $character) : CharactersInterface
Parameters
- $character : string
Return values
CharactersInterfacewithUNASegment()
Set whether the UNA segment should be part of the message or not.
public
withUNASegment(bool $include) : self
Parameters
- $include : bool
Return values
selfwithControlCharacter()
Set a control character.
private
withControlCharacter(string $type, string $character) : CharactersInterface
Parameters
- $type : string
- $character : string