Documentation

ArrayQueryActionTrait

Helper functions for performing api queries on arrays of data.

Table of Contents

Methods

compareValues()  : bool
filterCompare()  : bool
filterArray()  : array<string|int, mixed>
limitArray()  : array<string|int, mixed>
queryArray()  : mixed
selectArray()  : array<string|int, mixed>
sortArray()  : array<string|int, mixed>
evaluateFilters()  : bool
sortCompare()  : mixed
walkFilters()  : bool

Methods

compareValues()

public static compareValues(mixed $value, string $operator, mixed $expected) : bool
Parameters
$value : mixed
$operator : string
$expected : mixed
Return values
bool

filterCompare()

public static filterCompare(array<string|int, mixed> $row, array<string|int, mixed> $condition[, int|null $index = NULL ]) : bool
Parameters
$row : array<string|int, mixed>
$condition : array<string|int, mixed>
$index : int|null = NULL
Tags
throws
NotImplementedException
Return values
bool

filterArray()

protected filterArray(array<string|int, mixed> $values) : array<string|int, mixed>
Parameters
$values : array<string|int, mixed>
Return values
array<string|int, mixed>

limitArray()

protected limitArray(mixed $values) : array<string|int, mixed>
Parameters
$values : mixed
Return values
array<string|int, mixed>

queryArray()

protected queryArray(array<string|int, mixed> $values, Result $result) : mixed
Parameters
$values : array<string|int, mixed>

List of all rows to be filtered

$result : Result

Object to store result

selectArray()

protected selectArray(mixed $values) : array<string|int, mixed>
Parameters
$values : mixed
Return values
array<string|int, mixed>

sortArray()

protected sortArray(mixed $values) : array<string|int, mixed>
Parameters
$values : mixed
Return values
array<string|int, mixed>

evaluateFilters()

private evaluateFilters(array<string|int, mixed> $row) : bool
Parameters
$row : array<string|int, mixed>
Return values
bool

sortCompare()

private sortCompare(mixed $a, mixed $b) : mixed
Parameters
$a : mixed
$b : mixed

walkFilters()

private walkFilters(array<string|int, mixed> $row, array<string|int, mixed> $filters) : bool
Parameters
$row : array<string|int, mixed>
$filters : array<string|int, mixed>
Tags
throws
NotImplementedException
Return values
bool

        
On this page

Search results