buildVariables.php
Table of Contents
Functions
- buildVariables() : void
- Builds all fields variables definitions (edges, joins, etc.).
Functions
buildVariables()
Builds all fields variables definitions (edges, joins, etc.).
buildVariables([array<string|int, mixed> &$variables = [] ][, array<string|int, mixed> $fields = [] ][, array<string|int, mixed>|null $edges = [] ][, array<string|int, mixed>|null $joins = [] ][, ContainerInterface|null $container = null ][, string $docRef = AQL::DOC ][, array<string|int, mixed> $init = [] ]) : void
Field-level gating: when a field declares Field::REQUIRES and the
request-scoped authorizer denies it, the matching LET variable is
not emitted. Combined with the symmetric drop in aqlFields(),
the field disappears from both the AQL projection and the response
— no key in the JSON, no orphan reference in the AQL.
The check is uniform: edges, joins, and edge-counts all share the
same gating contract. A Filter::EDGES_COUNT companion is gated
exactly the same way as the others — it is simply not gated by
default because no Field::REQUIRES is declared on it. To gate
the count, declare Field::REQUIRES on the count entry itself.
Parameters
- $variables : array<string|int, mixed> = []
- $fields : array<string|int, mixed> = []
- $edges : array<string|int, mixed>|null = []
- $joins : array<string|int, mixed>|null = []
- $container : ContainerInterface|null = null
- $docRef : string = AQL::DOC
- $init : array<string|int, mixed> = []