Oihana PHP Arango

HasFilterDocumentation

Table of Contents

Methods

documentFilterPaths()  : array<string|int, mixed>
Generate documentation of all supported filter paths
buildFilterPathsRecursive()  : void
Recursively build filter paths documentation

Methods

documentFilterPaths()

Generate documentation of all supported filter paths

public documentFilterPaths([bool $includeTypes = true ][, bool $includeRelations = false ]) : array<string|int, mixed>
Parameters
$includeTypes : bool = true

Include filter types in output

$includeRelations : bool = false

Include relation references

Tags
example
$customersModel = $container->get(Models::CUSTOMERS);

$filterPaths = $customersModel->documentFilterPaths();

foreach ( $filterPaths as $path )
{
    echo $path['path'] . "\n";
}

Output :

name
id
status
created
modified
address
address.email
address.street
address.city
address.postalCode
additionalProperty[*]
additionalProperty[*].propertyID
additionalProperty[*].value
contactPoint[*]
contactPoint[*].email
contactPoint[*].telephone
employee[*]
employee[*].givenName
employee[*].familyName
employee[*].contactPoint[*]
employee[*].contactPoint[*].email
employee[*].workLocation
employee[*].workLocation.name
employee[*].workLocation.address
employee[*].workLocation.address.email
assignedSeller
assignedSeller.name
assignedSeller.givenName
category[*]
category[*].id
category[*].name
location[*]
location[*].name
location[*].address
location[*].address.email
Return values
array<string|int, mixed>

Array of supported filter paths with metadata

buildFilterPathsRecursive()

Recursively build filter paths documentation

private buildFilterPathsRecursive(string $key, mixed $config, array<string|int, mixed> $parentPath, array<string|int, mixed> &$paths, bool $includeTypes, bool $includeRelations) : void
Parameters
$key : string

Current segment key

$config : mixed

Current segment configuration

$parentPath : array<string|int, mixed>

Accumulated parent path

$paths : array<string|int, mixed>

Reference to paths accumulator

$includeTypes : bool

Include type information

$includeRelations : bool

Include relation references

On this page

Search results