Oihana PHP Arango

resolveEdges.php

Table of Contents

Functions

resolveEdges()  : void
Resolves and initializes internal edge model definitions from a dependency container.

Functions

resolveEdges()

Resolves and initializes internal edge model definitions from a dependency container.

resolveEdges([array<string|int, mixed>|null &$edges = [] ][, Container|null $container = null ]) : void

This helper ensures that all edge-related dependencies defined in the model configuration (under AQL::EDGES) are properly instantiated in the DI container.

It supports multiple edge definition formats:

  • Associative arrays mapping a property to its edge configuration.
  • Indexed arrays containing simple string references to container entries.
  • The special key AQL::RESOLVE (or __resolve__) for one-shot dependency resolution, used to pre-load edge models in memory without explicit configuration.

Typical usage:

resolveEdges( $model[AQL::EDGES] ?? [], $container );

Behavior:

  • Each string identifier found in indexed or AQL::RESOLVE arrays is resolved through the container.
  • Associative definitions are analyzed to resolve their AQL::MODEL entry if it refers to a container ID.
  • Existing Edges instances are left untouched.
Parameters
$edges : array<string|int, mixed>|null = []

The array of edge definitions to resolve (may be associative or indexed).

$container : Container|null = null

The DI container used to resolve Edges references.

Tags
throws
DependencyException

If a dependency cannot be loaded by the DI container.

NotFoundException

If a referenced container entry is not found.

ContainerExceptionInterface

If the container encounters a general error while resolving.

NotFoundExceptionInterface

If a referenced entry is missing in a PSR-11 container.

On this page

Search results