Interface

TRex\Iterator\IIteratorSorter

interface IIteratorSorter

Interface IIteratorSorter.

Methods

IObjects reindex()

Reindex the key numerically.

IObjects sort(SortType $type = null, callable|int $option = SORT_NATURAL)

Sorts values.

IObjects reverse(bool $areKeysPreserved = true)

Reverses the order of the values.

Details

at line 21
public IObjects reindex()

Reindex the key numerically.

Returns an IObjects with the same values but indexed keys.

Return Value

IObjects

at line 34
public IObjects sort(SortType $type = null, callable|int $option = SORT_NATURAL)

Sorts values.

For more info on sort, see PHP documentation. Returns an IObjects with sorted values. $type describes the type of sorting. (value/key/associative) $option is a PHP sort option or a callback.

Parameters

SortType $type
callable|int $option

Return Value

IObjects

at line 42
public IObjects reverse(bool $areKeysPreserved = true)

Reverses the order of the values.

Parameters

bool $areKeysPreserved

Return Value

IObjects