CorrelationId implements JsonSerializable

CorrelationId representation

Internal
Tags
todo

Check internal state during v10 development

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|null
$subject  : string|null
$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

$subject

protected string|null $subject = null

$version

protected int $version = self::DEFAULT_VERSION

Methods

__toString()

public __toString() : string
Return values
string

forScope()

public static forScope(string $scope) : self
Parameters
$scope : string
Return values
self

forSubject()

public static forSubject(string $subject, string ...$aspects) : self
Parameters
$subject : string
$aspects : string
Return values
self

fromString()

public static fromString(string $correlationId) : self
Parameters
$correlationId : string
Return values
self

getAspects()

public getAspects() : array<string|int, string>
Return values
array<string|int, string>

getScope()

public getScope() : string|null
Return values
string|null

getSubject()

public getSubject() : string|null
Return values
string|null

jsonSerialize()

public jsonSerialize() : string
Return values
string

withAspects()

public withAspects(string ...$aspects) : self
Parameters
$aspects : string
Return values
self

withSubject()

public withSubject(string $subject) : self
Parameters
$subject : string
Return values
self

create()

protected static create() : self
Return values
self

serialize()

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
Return values
string

        
On this page

Search results