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 : 21
public string $direction = self::SORT_ASC

public $target

SortClause.php : 23
public string $target

Methods

public__construct()

SortClause.php : 30
public __construct(string $sortTarget, string $sortDirection)

Parameters

Name Type Default value Description
$sortTarget string - -
$sortDirection string - -
Tags
Throws
InvalidArgumentException

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