resolveEdgeContext.php
Table of Contents
Functions
- resolveEdgeContext() : Edges, 1: string, 2: string}
- Resolves the common edge-traversal context shared by the edge variable builders.
Functions
resolveEdgeContext()
Resolves the common edge-traversal context shared by the edge variable builders.
resolveEdgeContext([array<string|int, mixed> $definition = [] ][, ContainerInterface|null $container = null ]) : Edges, 1: string, 2: string}
This helper centralizes the preamble duplicated by buildEdgeVariable() and buildEdgeCountVariable(): it resolves the Edges model from the definition (via getEdges()), validates it, reads its non-empty collection name and normalizes the traversal direction.
Parameters
- $definition : array<string|int, mixed> = []
-
The relation definition. Expected keys:
AQL::MODEL: the Edges model (instance, array or container id).AQL::DIRECTION: the traversal direction (defaults to Traversal::OUTBOUND).
- $container : ContainerInterface|null = null
-
Optional DI container used to resolve the model.
Tags
Return values
Edges, 1: string, 2: string} —A triplet [ $model , $edgeCollection , $direction ].