descKey.php
Table of Contents
Functions
- descKey() : string
- Returns the descending form of a sort key in the textual sort grammar (the same grammar consumed by `SortTrait::prepareSort` and the HTTP `?sort=` query parameter).
Functions
descKey()
Returns the descending form of a sort key in the textual sort grammar (the same grammar consumed by `SortTrait::prepareSort` and the HTTP `?sort=` query parameter).
descKey(string $key) : string
The descending form is the key prefixed with -. This helper centralizes
that convention, avoiding magic-string concatenations like
'-' . Prop::CREATED.
Do not confuse with aqlDesc(), which
builds the AQL output token ("doc.name DESC") — this helper produces
the HTTP/textual input token ("-name").
Parameters
- $key : string
-
The sort field (typically a typed constant such as
Prop::CREATED).
Tags
Return values
string —The descending sort token, prefixed with -.