HumHub Documentation (unofficial)

UniqueGenerator
in package

Proxy for other generators that returns only unique values.

Instantiated through @see Generator::unique().

Tags
mixin

Generator

Table of Contents

Properties

$generator  : mixed
$maxRetries  : mixed
$uniques  : array<string, array<string, null>>
Maps from method names to a map with serialized result keys.

Methods

__call()  : mixed
Catch and proxy all generator calls with arguments but return only unique values
__construct()  : mixed
__get()  : mixed
Catch and proxy all generator calls but return only unique values
ext()  : mixed

Properties

$uniques

Maps from method names to a map with serialized result keys.

protected array<string, array<string, null>> $uniques = []
Tags
example

[ 'phone' => ['0123' => null], 'city' => ['London' => null, 'Tokyo' => null], ]

Methods

__call()

Catch and proxy all generator calls with arguments but return only unique values

public __call(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
$name : string
$arguments : array<string|int, mixed>

__construct()

public __construct(Extension|Generator $generator[, int $maxRetries = 10000 ][, array<string, array<string, null>> &$uniques = [] ]) : mixed
Parameters
$generator : Extension|Generator
$maxRetries : int = 10000
$uniques : array<string, array<string, null>> = []

__get()

Catch and proxy all generator calls but return only unique values

public __get(string $attribute) : mixed
Parameters
$attribute : string
Tags
deprecated

Use a method instead.


        
On this page

Search results