MetaOnlyTrait
Holds the durable `metaOnly` default of a controller.
This trait exposes the metaOnly flag used as the base value when a list
query resolves whether the document-fetch step must be skipped (see
PrepareMetaOnlyTrait::prepareMetaOnly()). It mirrors LimitTrait:
the state lives here, the per-request resolution lives in the Prepare* trait.
The default stays false (documents are fetched), so nothing changes unless a
host wires Arango::META_ONLY => true in the controller $init — typically a
dedicated "facets / bounds" endpoint that should return the metadata only. A
request may still override it with ?metaOnly=false.
Tags
Table of Contents
Properties
- $metaOnly : bool
- The durable `metaOnly` default of the controller.
Methods
- initializeMetaOnly() : static
- Initializes the `metaOnly` default from an array.
Properties
$metaOnly
The durable `metaOnly` default of the controller.
public
bool
$metaOnly
= false
When true, list() returns the response metadata (exact total, and, when
requested, the facet counts and numeric bounds) without the documents.
Methods
initializeMetaOnly()
Initializes the `metaOnly` default from an array.
public
initializeMetaOnly([array<string|int, mixed> $init = [] ]) : static
Parameters
- $init : array<string|int, mixed> = []
-
Initialization array, read from the
Arango::META_ONLYkey.
Return values
static —Returns the current instance for method chaining.