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::RESOLVEarrays is resolved through the container. - Associative definitions are analyzed to resolve their
AQL::MODELentry if it refers to a container ID. - Existing
Edgesinstances 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
Edgesreferences.