final class NodeAddress implements JsonSerializable (View source)

This describes a node's read model identity namely:

In combination the parts can be used to distinctly identify a single node.

By using the content graph for the content repository one can build a subgraph with the right perspective to find this node:

 $subgraph = $contentRepository->getContentGraph($nodeAddress->workspaceName)->getSubgraph(
     $nodeAddress->dimensionSpacePoint,
     VisibilityConstraints::withoutRestrictions()
 );
 $node = $subgraph->findNodeById($nodeAddress->aggregateId);

Methods

static NodeAddress
create(ContentRepositoryId $contentRepositoryId, WorkspaceName $workspaceName, DimensionSpacePoint $dimensionSpacePoint, NodeAggregateId $aggregateId)

No description

static NodeAddress
fromNode(Node $node)

No description

static NodeAddress
fromArray(array $array)

No description

static NodeAddress
fromJsonString(string $jsonString)

No description

withAggregateId(NodeAggregateId $aggregateId)

No description

bool
equals(NodeAddress $other)

No description

string
toJson()

No description

mixed
jsonSerialize()

No description

Details

static NodeAddress create(ContentRepositoryId $contentRepositoryId, WorkspaceName $workspaceName, DimensionSpacePoint $dimensionSpacePoint, NodeAggregateId $aggregateId)

No description

Parameters

ContentRepositoryId $contentRepositoryId
WorkspaceName $workspaceName
DimensionSpacePoint $dimensionSpacePoint
NodeAggregateId $aggregateId

Return Value

NodeAddress

static NodeAddress fromNode(Node $node)

No description

Parameters

Node $node

Return Value

NodeAddress

static NodeAddress fromArray(array $array)

No description

Parameters

array $array

Return Value

NodeAddress

static NodeAddress fromJsonString(string $jsonString)

No description

Parameters

string $jsonString

Return Value

NodeAddress

NodeAddress withAggregateId(NodeAggregateId $aggregateId)

No description

Parameters

NodeAggregateId $aggregateId

Return Value

NodeAddress

bool equals(NodeAddress $other)

No description

Parameters

NodeAddress $other

Return Value

bool

string toJson()

No description

Return Value

string

mixed jsonSerialize()

No description

Return Value

mixed