CorrelationId implements JsonSerializable
CorrelationId representation
Tags
Table of Contents
Interfaces
- JsonSerializable
Constants
- DEFAULT_VERSION = 1
- PATTERN_V1 = '#^(?P<flags>[[:xdigit:]]{4})\$(?:(?P<scope>[[:alnum:]]+):)?(?P<subject>[[:alnum:]]+)(?P<aspects>(?:\/[[:alnum:]._-]+)*)$#'
Properties
- $aspects : array<string|int, string>
- $capabilities : int
- $scope : string
- $subject : string
- $version : int
Methods
- __toString() : string
- forScope() : static
- forSubject() : self
- fromString() : static
- getAspects() : array<string|int, string>
- getScope() : string|null
- getSubject() : string|null
- jsonSerialize() : string
- withAspects() : self
- withSubject() : self
- create() : static
- serialize() : string
- v1 specs (eBNF) + FLAGS "$" [ SCOPE ":" ] SUBJECT { "/" ASPECT } + FLAGS ::= XDIGIT (* 16-bit integer big-endian) + SCOPE ::= ALNUM { ALNUM } + SUBJECT ::= ALNUM { ALNUM } + ASPECT ::= ( ALNUM | '.' | '_' | '-' ) { ( ALNUM | '.' | '_' | '-' ) }
Constants
DEFAULT_VERSION
    protected
        mixed
    DEFAULT_VERSION
    = 1
    
    
    
    
PATTERN_V1
    protected
        mixed
    PATTERN_V1
    = '#^(?P<flags>[[:xdigit:]]{4})\$(?:(?P<scope>[[:alnum:]]+):)?(?P<subject>[[:alnum:]]+)(?P<aspects>(?:\/[[:alnum:]._-]+)*)$#'
    
    
    
    
Properties
$aspects
        protected
            array<string|int, string>
    $aspects
     = []
    
    
    
    
    
$capabilities
        protected
            int
    $capabilities
     = 0
    
    
    
    
    
$scope
        protected
            string
    $scope
    
    
    
    
    
    
$subject
        protected
            string
    $subject
    
    
    
    
    
    
$version
        protected
            int
    $version
     = self::DEFAULT_VERSION
    
    
    
    
    
Methods
__toString()
    public
                    __toString() : string
    Return values
stringforScope()
    public
            static        forScope(string $scope) : static
    Parameters
- $scope : string
Return values
staticforSubject()
    public
            static        forSubject(string $subject, string ...$aspects) : self
    Parameters
- $subject : string
- $aspects : string
Return values
selffromString()
    public
            static        fromString(string $correlationId) : static
    Parameters
- $correlationId : string
Return values
staticgetAspects()
    public
                    getAspects() : array<string|int, string>
    Return values
array<string|int, string>getScope()
    public
                    getScope() : string|null
    Return values
string|nullgetSubject()
    public
                    getSubject() : string|null
    Return values
string|nulljsonSerialize()
    public
                    jsonSerialize() : string
    Return values
stringwithAspects()
    public
                    withAspects(string ...$aspects) : self
    Parameters
- $aspects : string
Return values
selfwithSubject()
    public
                    withSubject(string $subject) : self
    Parameters
- $subject : string
Return values
selfcreate()
    protected
            static        create() : static
    Return values
staticserialize()
v1 specs (eBNF) + FLAGS "$" [ SCOPE ":" ] SUBJECT { "/" ASPECT } + FLAGS ::= XDIGIT (* 16-bit integer big-endian) + SCOPE ::= ALNUM { ALNUM } + SUBJECT ::= ALNUM { ALNUM } + ASPECT ::= ( ALNUM | '.' | '_' | '-' ) { ( ALNUM | '.' | '_' | '-' ) }
    protected
                    serialize() : string