An expression object for complex ORDER BY clauses
stringThe direction of sorting.
Cake\Database\ExpressionInterface|array|stringThe field name or expression to be used in the left hand side of the operator
Create a deep clone of the order clause.
Constructor
Returns the field name
Sets the field name
Converts the Node into a SQL string fragment.
Iterates over each part of the expression recursively for every level of the expressions tree and executes the $callback callable passing as first parameter the instance of the expression currently being iterated.
__clone(): void
Create a deep clone of the order clause.
void__construct(Cake\Database\ExpressionInterface|string $field, string $direction)
Constructor
Cake\Database\ExpressionInterface|string $field The field to order on.
string $direction The direction to sort on.
getField(): Cake\Database\ExpressionInterface|array|string
Returns the field name
Cake\Database\ExpressionInterface|array|stringsetField(Cake\Database\ExpressionInterface|array|string $field): void
Sets the field name
Cake\Database\ExpressionInterface|array|string $field The field to compare with.
voidsql(Cake\Database\ValueBinder $binder): string
Converts the Node into a SQL string fragment.
Cake\Database\ValueBinder $binder stringtraverse(Closure $callback): $this
Iterates over each part of the expression recursively for every level of the expressions tree and executes the $callback callable passing as first parameter the instance of the expression currently being iterated.
Closure $callback $thisThe direction of sorting.
stringThe field name or expression to be used in the left hand side of the operator
Cake\Database\ExpressionInterface|array|string
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Database.Expression.OrderClauseExpression.html