Copied!

SuggestionCollection

SuggestionCollection.php : 19

Properties

protected $items

AbstractInMemoryCollection.php : 24
protected array<string|int, mixed> $items

Methods

public__construct()

SuggestionCollection.php : 23
public __construct([array<string|int, mixed> $items = [] ][, int $totalCount = 0 ])

Parameters

Name Type Default value Description
$items array<string|int, mixed> [] -
$totalCount int 0 -

publicappend()

SuggestionCollection.php : 33
public append(mixed $item) : void

Parameters

Name Type Default value Description
$item mixed - -

publicclear()

MutableArrayList.php : 37
public clear() : void

publiccontains()

ArrayList.php : 50
public contains(mixed $value) : bool

Parameters

Name Type Default value Description
$value mixed - -

Return values

bool

publiccount()

AbstractInMemoryCollection.php : 49
public count() : int

Return values

int

publicdecreaseTotalCount()

SuggestionCollection.php : 65
public decreaseTotalCount(int $totalCount) : void

Parameters

Name Type Default value Description
$totalCount int - -

publicexists()

AbstractInMemoryCollection.php : 81

Tests the existence of an element that satisfies the given predicate.

public exists(Closure $predicate) : bool

Parameters

Name Type Default value Description
$predicate Closure - -

Return values

bool

publicfilter()

AbstractInMemoryCollection.php : 57

Returns all the elements of this collection that satisfy the predicate.

public filter(Closure $predicate) : self

Parameters

Name Type Default value Description
$predicate Closure - -

Return values

self

publicfirst()

ArrayList.php : 29

Return first element of collection.

public first() : TValue

Return values

TValue

publicforAll()

AbstractInMemoryCollection.php : 70

Tests whether the given predicate holds for all elements of this collection.

public forAll(Closure $predicate) : bool

Parameters

Name Type Default value Description
$predicate Closure - -

Return values

bool

publicgetIterator()

AbstractInMemoryCollection.php : 44
public getIterator() : Iterator

Return values

Iterator

publicgetTotalCount()

SuggestionCollection.php : 70
public getTotalCount() : int

Return values

int

publicincreaseTotalCount()

SuggestionCollection.php : 60
public increaseTotalCount(int $totalCount) : void

Parameters

Name Type Default value Description
$totalCount int - -

publicisEmpty()

AbstractInMemoryCollection.php : 34
public isEmpty() : bool

Return values

bool

publiclast()

ArrayList.php : 38

Return last element of collection.

public last() : TValue

Return values

TValue

publicmap()

AbstractInMemoryCollection.php : 65

Applies the given function to each element in the collection and returns a new collection with the elements returned by the function.

public map(Closure $function) : self

Parameters

Name Type Default value Description
$function Closure - -

Return values

self

publicprepend()

MutableArrayList.php : 24
public prepend(mixed $value) : void

Parameters

Name Type Default value Description
$value mixed - -

publicremove()

MutableArrayList.php : 29
public remove(mixed $value) : void

Parameters

Name Type Default value Description
$value mixed - -

publicsortByScore()

SuggestionCollection.php : 50
public sortByScore() : void

publictoArray()

AbstractInMemoryCollection.php : 39
public toArray() : array<string|int, TValue>

Return values

array<string|int, TValue>

publictruncate()

SuggestionCollection.php : 55
public truncate(int $count) : void

Parameters

Name Type Default value Description
$count int - -

protectedcreateFrom()

MutableArrayList.php : 42
protected createFrom(array<string|int, mixed> $items) : MutableArrayList

Parameters

Name Type Default value Description
$items array<string|int, mixed> - -

Return values

MutableArrayList