Oihana PHP Arango

DocumentsControllerListTrait uses \oihana\controllers\traits\BenchTrait, \oihana\controllers\traits\CheckOwnerArgumentsTrait, \oihana\models\traits\ModelTrait, \oihana\controllers\traits\OutputDocumentsTrait, trait:short, trait:short, trait:short, trait:short, trait:short, \oihana\controllers\traits\PrepareParamTrait, \oihana\controllers\traits\StatusTrait

Table of Contents

Methods

list()  : mixed
List a set of elements with the model.
prepareBounds()  : array<string|int, mixed>|null
Resolves the bound fields for a list query.
prepareFacetCounts()  : array<string|int, mixed>|null
Resolves the facet-count dimensions for a list query.
prepareFacetsOnly()  : bool
Resolves the `facetsOnly` flag for a list query.
prepareGroup()  : array<string|int, mixed>|null
Resolves the {@see Arango::GROUP} spec for a list query.
prepareMetaOnly()  : bool
Resolves the `metaOnly` flag for a list query.
mapGroupParams()  : array<string|int, mixed>
Maps the short HTTP {@see GroupParam} keys onto the {@see Group} vocabulary.

Methods

list()

List a set of elements with the model.

public list([ServerRequestInterface|null $request = null ][, ResponseInterface|null $response = null ][, array<string|int, mixed> $args = [] ][, array<string|int, mixed> $init = [] ]) : mixed

Ex: ../element?search=film Ex: ../element?facets={"location":12} Ex: ../element?facets={"type":"-event,visual/exhibition","eventStatus":"-scheduled"}

Parameters
$request : ServerRequestInterface|null = null
$response : ResponseInterface|null = null
$args : array<string|int, mixed> = []

The route arguments

$init : array<string|int, mixed> = []

ex: [ 'limit' => 0 ]

Tags
throws
ContainerExceptionInterface
NotFoundExceptionInterface

prepareBounds()

Resolves the bound fields for a list query.

protected prepareBounds(ServerRequestInterface|null $request[, array<string|int, mixed> $args = [] ][, array<string|int, mixed>|null &$params = null ]) : array<string|int, mixed>|null
Parameters
$request : ServerRequestInterface|null

The HTTP request.

$args : array<string|int, mixed> = []

Predefined options ($args[Arango::BOUNDS] as base).

$params : array<string|int, mixed>|null = null

Echoed query params, populated by reference.

Return values
array<string|int, mixed>|null

The list of bound keys, or null when none requested.

prepareFacetCounts()

Resolves the facet-count dimensions for a list query.

protected prepareFacetCounts(ServerRequestInterface|null $request[, array<string|int, mixed> $args = [] ][, array<string|int, mixed>|null &$params = null ]) : array<string|int, mixed>|null
Parameters
$request : ServerRequestInterface|null

The HTTP request.

$args : array<string|int, mixed> = []

Predefined options ($args[Arango::FACET_COUNTS] as base).

$params : array<string|int, mixed>|null = null

Echoed query params, populated by reference.

Return values
array<string|int, mixed>|null

The list of facet keys, or null when none requested.

prepareFacetsOnly()

Resolves the `facetsOnly` flag for a list query.

protected prepareFacetsOnly(ServerRequestInterface|null $request[, array<string|int, mixed> $args = [] ][, array<string|int, mixed>|null &$params = null ]) : bool
Parameters
$request : ServerRequestInterface|null

The HTTP request.

$args : array<string|int, mixed> = []

Predefined options ($args[Arango::FACETS_ONLY] as base).

$params : array<string|int, mixed>|null = null

Echoed query params, populated by reference.

Return values
bool

True when only the counts (no documents) are requested.

prepareGroup()

Resolves the {@see Arango::GROUP} spec for a list query.

protected prepareGroup(ServerRequestInterface|null $request[, array<string|int, mixed> $args = [] ][, array<string|int, mixed>|null &$params = null ]) : array<string|int, mixed>|null
Parameters
$request : ServerRequestInterface|null

The HTTP request.

$args : array<string|int, mixed> = []

Predefined options ($args[Arango::GROUP] as base).

$params : array<string|int, mixed>|null = null

Echoed query params, populated by reference.

Return values
array<string|int, mixed>|null

The Group spec, or null when no grouping is requested.

prepareMetaOnly()

Resolves the `metaOnly` flag for a list query.

protected prepareMetaOnly(ServerRequestInterface|null $request[, array<string|int, mixed> $args = [] ][, array<string|int, mixed>|null &$params = null ]) : bool

Precedence, from weakest to strongest:

  1. the controller default MetaOnlyTrait::$metaOnly (itself false unless Arango::META_ONLY => true was wired in the controller $init) ;
  2. $args[Arango::META_ONLY], the per-call $init of list() ;
  3. the ?metaOnly= query param, which always wins when present.
Parameters
$request : ServerRequestInterface|null

The HTTP request.

$args : array<string|int, mixed> = []

Predefined options ($args[Arango::META_ONLY] overrides the controller default).

$params : array<string|int, mixed>|null = null

Echoed query params, populated by reference.

Return values
bool

True when only the metadata (no documents) is requested.

mapGroupParams()

Maps the short HTTP {@see GroupParam} keys onto the {@see Group} vocabulary.

private mapGroupParams(array<string|int, mixed> $decoded) : array<string|int, mixed>
Parameters
$decoded : array<string|int, mixed>

The decoded ?group= JSON object.

Return values
array<string|int, mixed>

The translated spec keyed by Group::*.

On this page

Search results