Copied!

SortClause

SortClause.php : 16

This class is the base for SortClause classes, used to set sorting of URL queries.

Constants

publicSORT_ASC

SortClause.php : 18
public mixed SORT_ASC = 'ascending'

publicSORT_DESC

SortClause.php : 19
public mixed SORT_DESC = 'descending'

Properties

public $direction

SortClause.php : 26

Sort direction.

public string $direction = self::SORT_ASC

public $target

SortClause.php : 33

Sort target.

public string $target

Methods

public__construct()

SortClause.php : 43

Constructs a new SortClause on $sortTarget in direction $sortDirection.

public __construct(string $sortTarget, string $sortDirection)

Parameters

Name Type Default value Description
$sortTarget string - -
$sortDirection string -

one of SortClause::SORT_ASC or SortClause::SORT_DESC

Tags
Throws
InvalidArgumentException

if the given sort order isn't one of SortClause::SORT_ASC or SortClause::SORT_DESC