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() : self
- forSubject() : self
- fromString() : self
- getAspects() : array<string|int, string>
- getScope() : string|null
- getSubject() : string|null
- jsonSerialize() : string
- withAspects() : self
- withSubject() : self
- create() : self
- 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) : self
Parameters
- $scope : string
Return values
selfforSubject()
public
static forSubject(string $subject, string ...$aspects) : self
Parameters
- $subject : string
- $aspects : string
Return values
selffromString()
public
static fromString(string $correlationId) : self
Parameters
- $correlationId : string
Return values
selfgetAspects()
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() : self
Return values
selfserialize()
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