Class

TRex\Iterator\SortType

class SortType extends Enum

Class SortType.

Contains the different types of IIteratorSorter.

Constants

VALUE_SORT_TYPE

Sort type by value.

Sort const.

KEY_SORT_TYPE

Sort type by key.

Sort const.

ASSOCIATIVE_SORT_TYPE

Sort type in an associative way.

Sort const.

Methods

__construct(mixed $value)

Constructor.

from Enum
array getConstList()

Returns the list of the possible values.

from Enum
mixed|string getValue(bool $isForCallable = false)

Returns the current value.

bool is(mixed $expectedValue)

Indicates whether the current value is $expectedValue.

from Enum

Details

in Enum at line 26
public __construct(mixed $value)

Constructor.

$data is initial data to set in the object. Keys are property names, and values are initial property values. $data could be a JSON string, an array or an array castable object.

Parameters

mixed $value

in Enum at line 39
public array getConstList()

Returns the list of the possible values.

Return Value

array

at line 40
public mixed|string getValue(bool $isForCallable = false)

Returns the current value.

Parameters

bool $isForCallable

Return Value

mixed|string

in Enum at line 61
public bool is(mixed $expectedValue)

Indicates whether the current value is $expectedValue.

Parameters

mixed $expectedValue

Return Value

bool