Oihana PHP Arango

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
throws
ContainerExceptionInterface
NotFoundExceptionInterface
UnexpectedValueException

If the model is not an Edges instance or its collection is empty.

Return values
Edges, 1: string, 2: string}

A triplet [ $model , $edgeCollection , $direction ].

On this page

Search results