An expression object for complex ORDER BY clauses
string
The direction of sorting.
string|array|\Cake\Database\ExpressionInterface
The field name or expression to be used in the left hand side of the operator
Iterates over each part of the expression recursively for every level of the expressions tree and executes the $visitor callable passing as first parameter the instance of the expression currently being iterated.
__clone()
Create a deep clone of the order clause.
__construct(mixed $field, mixed $direction)
Constructor
\Cake\Database\ExpressionInterface|string
$field The field to order on.
string
$direction The direction to sort on.
getField()
Returns the field name
string|array|\Cake\Database\ExpressionInterface
setField(mixed $field)
Sets the field name
string|array|\Cake\Database\ExpressionInterface
$field The field to compare with.
sql(\Cake\Database\ValueBinder $generator)
Converts the Node into a SQL string fragment.
\Cake\Database\ValueBinder
$generator Placeholder generator object
string
traverse(\Closure $visitor)
Iterates over each part of the expression recursively for every level of the expressions tree and executes the $visitor callable passing as first parameter the instance of the expression currently being iterated.
\Closure
$visitor The callable to apply to all nodes.
$this
The direction of sorting.
string
The field name or expression to be used in the left hand side of the operator
string|array|\Cake\Database\ExpressionInterface
© 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.1/class-Cake.Database.Expression.OrderClauseExpression.html