Fr3nch13/CakePHP Utilities

OrderClauseExpression
in package
implements ExpressionInterface, FieldInterface uses FieldTrait

An expression object for complex ORDER BY clauses

Table of Contents

Interfaces

ExpressionInterface
An interface used by Expression objects.
FieldInterface
Describes a getter and a setter for the a field property. Useful for expressions that contain an identifier to compare against.

Properties

$_direction  : string
The direction of sorting.
$_field  : ExpressionInterface|array<string|int, mixed>|string
The field name or expression to be used in the left hand side of the operator

Methods

__clone()  : void
Create a deep clone of the order clause.
__construct()  : mixed
Constructor
getField()  : ExpressionInterface|array<string|int, mixed>|string
Returns the field name
setField()  : void
Sets the field name
sql()  : string
Converts the Node into a SQL string fragment.
traverse()  : $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.

Properties

$_field

The field name or expression to be used in the left hand side of the operator

protected ExpressionInterface|array<string|int, mixed>|string $_field

Methods

sql()

Converts the Node into a SQL string fragment.

public sql(ValueBinder $binder) : string
Parameters
$binder : ValueBinder

Parameter binder

Tags
inheritDoc
Return values
string

traverse()

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.

public traverse(Closure $callback) : $this
Parameters
$callback : Closure

The callable to apply to all nodes.

Tags
inheritDoc
Return values
$this

        
On this page

Search results