getEdges.php
Table of Contents
Functions
- getEdges() : Edges|null
- Retrieves an {@see Edges} instance from various types of input definitions.
Functions
getEdges()
Retrieves an {@see Edges} instance from various types of input definitions.
getEdges([array<string|int, mixed>|string|Edges|null $definition = null ][, ContainerInterface|null $container = null ][, string $key = Arango::EDGES ][, Edges|null $default = null ]) : Edges|null
This helper function resolves an Edges object from a direct instance, an array definition,
a service name within a PSR-11 container, or falls back to a provided default value.
Behavior:
- If
$definitionis anEdgesinstance, it is returned as-is. - If
$definitionis an array, the function looks for theArango::EDGESkey. - If
$definitionis a non-empty string and$containercontains a service with that name, the corresponding service is fetched. - If none of the above conditions are met, the
$defaultvalue is returned.
Parameters
- $definition : array<string|int, mixed>|string|Edges|null = null
-
Input definition that may represent an
Edgesinstance, an associative array containing one, or a container service name. - $container : ContainerInterface|null = null
-
Optional PSR-11 container used to resolve string service names.
- $key : string = Arango::EDGES
-
Array key to look for when
$definitionis an array - $default : Edges|null = null
-
Default
Edgesinstance to return if resolution fails.
Tags
Return values
Edges|null —Returns the resolved Edges instance or the default value if not found.