Fr3nch13/CakePHP Utilities

AggregateExpression extends FunctionExpression
in package
implements WindowInterface

This represents an SQL aggregate function expression in an SQL statement.

Calls can be constructed by passing the name of the function and a list of params. For security reasons, all params passed are quoted by default unless explicitly told otherwise.

Table of Contents

Interfaces

WindowInterface
This defines the functions used for building window expressions.

Properties

$_conditions  : array<string|int, mixed>
A list of strings or other expression objects that represent the "branches" of the expression tree. For example one key of the array might look like "sum > :value"
$_conjunction  : string
String to be used for joining each of the internal expressions this object internally stores for example "AND", "OR", etc.
$_name  : string
The name of the function to be constructed when generating the SQL string
$_returnType  : string
The type name this expression will return when executed
$_typeMap  : TypeMap|null
$filter  : QueryExpression
$window  : WindowExpression

Methods

__clone()  : void
Clone this object and its subtree of expressions.
__construct()  : mixed
Constructor. Takes a name for the function to be invoked and a list of params to be passed into the function. Optionally you can pass a list of types to be used for each bound param.
add()  : $this
Adds one or more arguments for the function call.
addCase()  : $this
Adds a new case expression to the expression object
and()  : QueryExpression
Returns a new QueryExpression object containing all the conditions passed and set up the conjunction to be "AND"
and_()  : QueryExpression
Returns a new QueryExpression object containing all the conditions passed and set up the conjunction to be "AND"
between()  : $this
Adds a new condition to the expression object in the form "field BETWEEN from AND to".
case()  : CaseStatementExpression
Returns a new case expression object.
count()  : int
The name of the function is in itself an expression to generate, thus always adding 1 to the amount of expressions stored in this object.
eq()  : $this
Adds a new condition to the expression object in the form "field = value".
equalFields()  : $this
Builds equal condition or assignment with identifier wrapping.
excludeCurrent()  : $this
Adds current row frame exclusion.
excludeGroup()  : $this
Adds group frame exclusion.
excludeTies()  : $this
Adds ties frame exclusion.
exists()  : $this
Adds a new condition to the expression object in the form "EXISTS (...)".
filter()  : $this
Adds conditions to the FILTER clause. The conditions are the same format as `Query::where()`.
frame()  : $this
Adds a frame to the window.
getConjunction()  : string
Gets the currently configured conjunction for the conditions at this level of the expression tree.
getDefaultTypes()  : array<int|string, string>
Gets default types of current type map.
getName()  : string
Gets the name of the SQL function to be invoke in this expression.
getReturnType()  : string
Gets the type of the value this object will generate.
getTypeMap()  : TypeMap
Returns the existing type map.
groups()  : $this
Adds a simple groups frame to the window.
gt()  : $this
Adds a new condition to the expression object in the form "field > value".
gte()  : $this
Adds a new condition to the expression object in the form "field >= value".
hasNestedExpression()  : bool
Returns true if this expression contains any other nested ExpressionInterface objects
in()  : $this
Adds a new condition to the expression object in the form "field IN (value1, value2)".
isCallable()  : bool
Check whether a callable is acceptable.
isNotNull()  : $this
Adds a new condition to the expression object in the form "field IS NOT NULL".
isNull()  : $this
Adds a new condition to the expression object in the form "field IS NULL".
iterateParts()  : $this
Executes a callable function for each of the parts that form this expression.
like()  : $this
Adds a new condition to the expression object in the form "field LIKE value".
lt()  : $this
Adds a new condition to the expression object in the form "field < value".
lte()  : $this
Adds a new condition to the expression object in the form "field <= value".
not()  : $this
Adds a new set of conditions to this level of the tree and negates the final result by prepending a NOT, it will look like "NOT ( (condition1) AND (conditions2) )" conjunction depends on the one currently configured for this object.
notEq()  : $this
Adds a new condition to the expression object in the form "field != value".
notExists()  : $this
Adds a new condition to the expression object in the form "NOT EXISTS (...)".
notIn()  : $this
Adds a new condition to the expression object in the form "field NOT IN (value1, value2)".
notInOrNull()  : $this
Adds a new condition to the expression object in the form "(field NOT IN (value1, value2) OR field IS NULL".
notLike()  : $this
Adds a new condition to the expression object in the form "field NOT LIKE value".
or()  : QueryExpression
Returns a new QueryExpression object containing all the conditions passed and set up the conjunction to be "OR"
or_()  : QueryExpression
Returns a new QueryExpression object containing all the conditions passed and set up the conjunction to be "OR"
order()  : $this
Adds one or more order clauses to the window.
over()  : $this
Adds an empty `OVER()` window expression or a named window epression.
partition()  : $this
Adds one or more partition expressions to the window.
range()  : $this
Adds a simple range frame to the window.
rows()  : $this
Adds a simple rows frame to the window.
setConjunction()  : $this
Changes the conjunction for the conditions at this level of the expression tree.
setDefaultTypes()  : $this
Overwrite the default type mappings for fields in the implementing object.
setName()  : $this
Sets the name of the SQL function to be invoke in this expression.
setReturnType()  : $this
Sets the type of the value this object will generate.
setTypeMap()  : $this
Creates a new TypeMap if $typeMap is an array, otherwise exchanges it for the given one.
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.
_addConditions()  : void
Auxiliary function used for decomposing a nested array of conditions and build a tree structure inside this object to represent the full SQL expression.
_calculateType()  : string|null
Returns the type name for the passed field if it was stored in the typeMap
_castToExpression()  : mixed
Conditionally converts the passed value to an ExpressionInterface object if the type class implements the ExpressionTypeInterface. Otherwise, returns the value unmodified.
_parseCondition()  : ExpressionInterface
Parses a string conditions by trying to extract the operator inside it if any and finally returning either an adequate QueryExpression object or a plain string representation of the condition. This function is responsible for generating the placeholders and replacing the values by them, while storing the value elsewhere for future binding.
_requiresToExpressionCasting()  : array<string|int, mixed>
Returns an array with the types that require values to be casted to expressions, out of the list of type names passed as parameter.

Properties

$_conditions

A list of strings or other expression objects that represent the "branches" of the expression tree. For example one key of the array might look like "sum > :value"

protected array<string|int, mixed> $_conditions = []

$_conjunction

String to be used for joining each of the internal expressions this object internally stores for example "AND", "OR", etc.

protected string $_conjunction

$_name

The name of the function to be constructed when generating the SQL string

protected string $_name

$_returnType

The type name this expression will return when executed

protected string $_returnType = 'string'

Methods

__clone()

Clone this object and its subtree of expressions.

public __clone() : void

__construct()

Constructor. Takes a name for the function to be invoked and a list of params to be passed into the function. Optionally you can pass a list of types to be used for each bound param.

public __construct(string $name[, array<string|int, mixed> $params = [] ][, array<string, string>|array<string|int, string|null> $types = [] ][, string $returnType = 'string' ]) : mixed

By default, all params that are passed will be quoted. If you wish to use literal arguments, you need to explicitly hint this function.

Examples:

$f = new FunctionExpression('CONCAT', ['CakePHP', ' rules']);

Previous line will generate CONCAT('CakePHP', ' rules')

$f = new FunctionExpression('CONCAT', ['name' => 'literal', ' rules']);

Will produce CONCAT(name, ' rules')

Parameters
$name : string

the name of the function to be constructed

$params : array<string|int, mixed> = []

list of arguments to be passed to the function If associative the key would be used as argument when value is 'literal'

$types : array<string, string>|array<string|int, string|null> = []

Associative array of types to be associated with the passed arguments

$returnType : string = 'string'

The return type of this expression

add()

Adds one or more arguments for the function call.

public add(array<string|int, mixed> $conditions[, array<string, string> $types = [] ][, bool $prepend = false ]) : $this
Parameters
$conditions : array<string|int, mixed>

list of arguments to be passed to the function If associative the key would be used as argument when value is 'literal'

$types : array<string, string> = []

Associative array of types to be associated with the passed arguments

$prepend : bool = false

Whether to prepend or append to the list of arguments

Tags
see
FunctionExpression::__construct()

for more details.

psalm-suppress

MoreSpecificImplementedParamType

Return values
$this

addCase()

Adds a new case expression to the expression object

public addCase(ExpressionInterface|array<string|int, mixed> $conditions[, ExpressionInterface|array<string|int, mixed> $values = [] ][, array<string|int, string> $types = [] ]) : $this

Use QueryExpression::case() or CaseStatementExpression instead

Parameters
$conditions : ExpressionInterface|array<string|int, mixed>

The conditions to test. Must be a ExpressionInterface instance, or an array of ExpressionInterface instances.

$values : ExpressionInterface|array<string|int, mixed> = []

Associative array of values to be associated with the conditions passed in $conditions. If there are more $values than $conditions, the last $value is used as the ELSE value.

$types : array<string|int, string> = []

Associative array of types to be associated with the values passed in $values

Return values
$this

and()

Returns a new QueryExpression object containing all the conditions passed and set up the conjunction to be "AND"

public and(ExpressionInterface|Closure|array<string|int, mixed>|string $conditions[, array<string, string> $types = [] ]) : QueryExpression
Parameters
$conditions : ExpressionInterface|Closure|array<string|int, mixed>|string

to be joined with AND

$types : array<string, string> = []

Associative array of fields pointing to the type of the values that are being passed. Used for correctly binding values to statements.

Return values
QueryExpression

and_()

Returns a new QueryExpression object containing all the conditions passed and set up the conjunction to be "AND"

public and_(ExpressionInterface|Closure|array<string|int, mixed>|string $conditions[, array<string, string> $types = [] ]) : QueryExpression

Use instead.

Parameters
$conditions : ExpressionInterface|Closure|array<string|int, mixed>|string

to be joined with AND

$types : array<string, string> = []

Associative array of fields pointing to the type of the values that are being passed. Used for correctly binding values to statements.

Return values
QueryExpression

between()

Adds a new condition to the expression object in the form "field BETWEEN from AND to".

public between(ExpressionInterface|string $field, mixed $from, mixed $to[, string|null $type = null ]) : $this
Parameters
$field : ExpressionInterface|string

The field name to compare for values inbetween the range.

$from : mixed

The initial value of the range.

$to : mixed

The ending value in the comparison range.

$type : string|null = null

the type name for $value as configured using the Type map.

Return values
$this

case()

Returns a new case expression object.

public case([ExpressionInterface|object|scalar|null $value = null ][, string|null $type = null ]) : CaseStatementExpression

When a value is set, the syntax generated is CASE case_value WHEN when_value ... END (simple case), where the when_value's are compared against the case_value.

When no value is set, the syntax generated is CASE WHEN when_conditions ... END (searched case), where the conditions hold the comparisons.

Note that null is a valid case value, and thus should only be passed if you actually want to create the simple case expression variant!

Parameters
$value : ExpressionInterface|object|scalar|null = null

The case value.

$type : string|null = null

The case value type. If no type is provided, the type will be tried to be inferred from the value.

Return values
CaseStatementExpression

count()

The name of the function is in itself an expression to generate, thus always adding 1 to the amount of expressions stored in this object.

public count() : int
Tags
inheritDoc
Return values
int

eq()

Adds a new condition to the expression object in the form "field = value".

public eq(ExpressionInterface|string $field, mixed $value[, string|null $type = null ]) : $this
Parameters
$field : ExpressionInterface|string

Database field to be compared against value

$value : mixed

The value to be bound to $field for comparison

$type : string|null = null

the type name for $value as configured using the Type map. If it is suffixed with "[]" and the value is an array then multiple placeholders will be created, one per each value in the array.

Return values
$this

equalFields()

Builds equal condition or assignment with identifier wrapping.

public equalFields(string $leftField, string $rightField) : $this
Parameters
$leftField : string

Left join condition field name.

$rightField : string

Right join condition field name.

Return values
$this

excludeCurrent()

Adds current row frame exclusion.

public excludeCurrent() : $this
Tags
inheritDoc
Return values
$this

excludeGroup()

Adds group frame exclusion.

public excludeGroup() : $this
Tags
inheritDoc
Return values
$this

excludeTies()

Adds ties frame exclusion.

public excludeTies() : $this
Tags
inheritDoc
Return values
$this

filter()

Adds conditions to the FILTER clause. The conditions are the same format as `Query::where()`.

public filter(ExpressionInterface|Closure|array<string|int, mixed>|string $conditions[, array<string, string> $types = [] ]) : $this
Parameters
$conditions : ExpressionInterface|Closure|array<string|int, mixed>|string

The conditions to filter on.

$types : array<string, string> = []

Associative array of type names used to bind values to query

Tags
see
Query::where()
Return values
$this

frame()

Adds a frame to the window.

public frame(string $type, mixed $startOffset, string $startDirection, mixed $endOffset, string $endDirection) : $this
Parameters
$type : string

Frame type

$startOffset : mixed

Frame start offset

$startDirection : string

Frame start direction

$endOffset : mixed

Frame end offset

$endDirection : string

Frame end direction

Tags
inheritDoc
Return values
$this

getConjunction()

Gets the currently configured conjunction for the conditions at this level of the expression tree.

public getConjunction() : string
Return values
string

getDefaultTypes()

Gets default types of current type map.

public getDefaultTypes() : array<int|string, string>
Return values
array<int|string, string>

getName()

Gets the name of the SQL function to be invoke in this expression.

public getName() : string
Return values
string

getReturnType()

Gets the type of the value this object will generate.

public getReturnType() : string
Return values
string

groups()

Adds a simple groups frame to the window.

public groups(int|null $start[, int|null $end = 0 ]) : $this
Parameters
$start : int|null

Frame start

$end : int|null = 0

Frame end If not passed in, only frame start SQL will be generated.

Tags
inheritDoc
Return values
$this

gt()

Adds a new condition to the expression object in the form "field > value".

public gt(ExpressionInterface|string $field, mixed $value[, string|null $type = null ]) : $this
Parameters
$field : ExpressionInterface|string

Database field to be compared against value

$value : mixed

The value to be bound to $field for comparison

$type : string|null = null

the type name for $value as configured using the Type map.

Return values
$this

gte()

Adds a new condition to the expression object in the form "field >= value".

public gte(ExpressionInterface|string $field, mixed $value[, string|null $type = null ]) : $this
Parameters
$field : ExpressionInterface|string

Database field to be compared against value

$value : mixed

The value to be bound to $field for comparison

$type : string|null = null

the type name for $value as configured using the Type map.

Return values
$this

hasNestedExpression()

Returns true if this expression contains any other nested ExpressionInterface objects

public hasNestedExpression() : bool
Return values
bool

in()

Adds a new condition to the expression object in the form "field IN (value1, value2)".

public in(ExpressionInterface|string $field, ExpressionInterface|array<string|int, mixed>|string $values[, string|null $type = null ]) : $this
Parameters
$field : ExpressionInterface|string

Database field to be compared against value

$values : ExpressionInterface|array<string|int, mixed>|string

the value to be bound to $field for comparison

$type : string|null = null

the type name for $value as configured using the Type map.

Return values
$this

isCallable()

Check whether a callable is acceptable.

public isCallable(ExpressionInterface|callable|array<string|int, mixed>|string $callable) : bool

This method is unused.

We don't accept ['class', 'method'] style callbacks, as they often contain user input and arrays of strings are easy to sneak in.

Parameters
$callable : ExpressionInterface|callable|array<string|int, mixed>|string

The callable to check.

Tags
codeCoverageIgnore
Return values
bool

Valid callable.

isNotNull()

Adds a new condition to the expression object in the form "field IS NOT NULL".

public isNotNull(ExpressionInterface|string $field) : $this
Parameters
$field : ExpressionInterface|string

database field to be tested for not null

Return values
$this

iterateParts()

Executes a callable function for each of the parts that form this expression.

public iterateParts(callable $callback) : $this

The callable function is required to return a value with which the currently visited part will be replaced. If the callable function returns null then the part will be discarded completely from this expression.

The callback function will receive each of the conditions as first param and the key as second param. It is possible to declare the second parameter as passed by reference, this will enable you to change the key under which the modified part is stored.

Parameters
$callback : callable

The callable to apply to each part.

Return values
$this

like()

Adds a new condition to the expression object in the form "field LIKE value".

public like(ExpressionInterface|string $field, mixed $value[, string|null $type = null ]) : $this
Parameters
$field : ExpressionInterface|string

Database field to be compared against value

$value : mixed

The value to be bound to $field for comparison

$type : string|null = null

the type name for $value as configured using the Type map.

Return values
$this

lt()

Adds a new condition to the expression object in the form "field < value".

public lt(ExpressionInterface|string $field, mixed $value[, string|null $type = null ]) : $this
Parameters
$field : ExpressionInterface|string

Database field to be compared against value

$value : mixed

The value to be bound to $field for comparison

$type : string|null = null

the type name for $value as configured using the Type map.

Return values
$this

lte()

Adds a new condition to the expression object in the form "field <= value".

public lte(ExpressionInterface|string $field, mixed $value[, string|null $type = null ]) : $this
Parameters
$field : ExpressionInterface|string

Database field to be compared against value

$value : mixed

The value to be bound to $field for comparison

$type : string|null = null

the type name for $value as configured using the Type map.

Return values
$this

not()

Adds a new set of conditions to this level of the tree and negates the final result by prepending a NOT, it will look like "NOT ( (condition1) AND (conditions2) )" conjunction depends on the one currently configured for this object.

public not(ExpressionInterface|Closure|array<string|int, mixed>|string $conditions[, array<string, string> $types = [] ]) : $this
Parameters
$conditions : ExpressionInterface|Closure|array<string|int, mixed>|string

to be added and negated

$types : array<string, string> = []

Associative array of fields pointing to the type of the values that are being passed. Used for correctly binding values to statements.

Return values
$this

notEq()

Adds a new condition to the expression object in the form "field != value".

public notEq(ExpressionInterface|string $field, mixed $value[, string|null $type = null ]) : $this
Parameters
$field : ExpressionInterface|string

Database field to be compared against value

$value : mixed

The value to be bound to $field for comparison

$type : string|null = null

the type name for $value as configured using the Type map. If it is suffixed with "[]" and the value is an array then multiple placeholders will be created, one per each value in the array.

Return values
$this

notIn()

Adds a new condition to the expression object in the form "field NOT IN (value1, value2)".

public notIn(ExpressionInterface|string $field, ExpressionInterface|array<string|int, mixed>|string $values[, string|null $type = null ]) : $this
Parameters
$field : ExpressionInterface|string

Database field to be compared against value

$values : ExpressionInterface|array<string|int, mixed>|string

the value to be bound to $field for comparison

$type : string|null = null

the type name for $value as configured using the Type map.

Return values
$this

notInOrNull()

Adds a new condition to the expression object in the form "(field NOT IN (value1, value2) OR field IS NULL".

public notInOrNull(ExpressionInterface|string $field, ExpressionInterface|array<string|int, mixed>|string $values[, string|null $type = null ]) : $this
Parameters
$field : ExpressionInterface|string

Database field to be compared against value

$values : ExpressionInterface|array<string|int, mixed>|string

the value to be bound to $field for comparison

$type : string|null = null

the type name for $value as configured using the Type map.

Return values
$this

notLike()

Adds a new condition to the expression object in the form "field NOT LIKE value".

public notLike(ExpressionInterface|string $field, mixed $value[, string|null $type = null ]) : $this
Parameters
$field : ExpressionInterface|string

Database field to be compared against value

$value : mixed

The value to be bound to $field for comparison

$type : string|null = null

the type name for $value as configured using the Type map.

Return values
$this

or()

Returns a new QueryExpression object containing all the conditions passed and set up the conjunction to be "OR"

public or(ExpressionInterface|Closure|array<string|int, mixed>|string $conditions[, array<string, string> $types = [] ]) : QueryExpression
Parameters
$conditions : ExpressionInterface|Closure|array<string|int, mixed>|string

to be joined with OR

$types : array<string, string> = []

Associative array of fields pointing to the type of the values that are being passed. Used for correctly binding values to statements.

Return values
QueryExpression

or_()

Returns a new QueryExpression object containing all the conditions passed and set up the conjunction to be "OR"

public or_(ExpressionInterface|Closure|array<string|int, mixed>|string $conditions[, array<string, string> $types = [] ]) : QueryExpression

Use instead.

Parameters
$conditions : ExpressionInterface|Closure|array<string|int, mixed>|string

to be joined with OR

$types : array<string, string> = []

Associative array of fields pointing to the type of the values that are being passed. Used for correctly binding values to statements.

Return values
QueryExpression

order()

Adds one or more order clauses to the window.

public order(mixed $fields) : $this
Parameters
$fields : mixed

Order expressions

Tags
inheritDoc
Return values
$this

over()

Adds an empty `OVER()` window expression or a named window epression.

public over([string|null $name = null ]) : $this
Parameters
$name : string|null = null

Window name

Return values
$this

partition()

Adds one or more partition expressions to the window.

public partition(mixed $partitions) : $this
Parameters
$partitions : mixed

Partition expressions

Tags
inheritDoc
Return values
$this

range()

Adds a simple range frame to the window.

public range(mixed $start[, mixed $end = 0 ]) : $this
Parameters
$start : mixed

Frame start

$end : mixed = 0

Frame end If not passed in, only frame start SQL will be generated.

Tags
inheritDoc
Return values
$this

rows()

Adds a simple rows frame to the window.

public rows(int|null $start[, int|null $end = 0 ]) : $this
Parameters
$start : int|null

Frame start

$end : int|null = 0

Frame end If not passed in, only frame start SQL will be generated.

Tags
inheritDoc
Return values
$this

setConjunction()

Changes the conjunction for the conditions at this level of the expression tree.

public setConjunction(string $conjunction) : $this
Parameters
$conjunction : string

Value to be used for joining conditions

Return values
$this

setDefaultTypes()

Overwrite the default type mappings for fields in the implementing object.

public setDefaultTypes(array<int|string, string> $types) : $this

This method is useful if you need to set type mappings that are shared across multiple functions/expressions in a query.

To add a default without overwriting existing ones use getTypeMap()->addDefaults()

Parameters
$types : array<int|string, string>

The array of types to set.

Tags
see
TypeMap::setDefaults()
Return values
$this

setName()

Sets the name of the SQL function to be invoke in this expression.

public setName(string $name) : $this
Parameters
$name : string

The name of the function

Return values
$this

setReturnType()

Sets the type of the value this object will generate.

public setReturnType(string $type) : $this
Parameters
$type : string

The name of the type that is to be returned

Return values
$this

setTypeMap()

Creates a new TypeMap if $typeMap is an array, otherwise exchanges it for the given one.

public setTypeMap(TypeMap|array<string|int, mixed> $typeMap) : $this
Parameters
$typeMap : TypeMap|array<string|int, mixed>

Creates a TypeMap if array, otherwise sets the given TypeMap

Return values
$this

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

_addConditions()

Auxiliary function used for decomposing a nested array of conditions and build a tree structure inside this object to represent the full SQL expression.

protected _addConditions(array<string|int, mixed> $conditions, array<int|string, string> $types) : void

String conditions are stored directly in the conditions, while any other representation is wrapped around an adequate instance or of this class.

Parameters
$conditions : array<string|int, mixed>

list of conditions to be stored in this object

$types : array<int|string, string>

list of types associated on fields referenced in $conditions

_calculateType()

Returns the type name for the passed field if it was stored in the typeMap

protected _calculateType(ExpressionInterface|string $field) : string|null
Parameters
$field : ExpressionInterface|string

The field name to get a type for.

Return values
string|null

The computed type or null, if the type is unknown.

_castToExpression()

Conditionally converts the passed value to an ExpressionInterface object if the type class implements the ExpressionTypeInterface. Otherwise, returns the value unmodified.

protected _castToExpression(mixed $value[, string|null $type = null ]) : mixed
Parameters
$value : mixed

The value to convert to ExpressionInterface

$type : string|null = null

The type name

_parseCondition()

Parses a string conditions by trying to extract the operator inside it if any and finally returning either an adequate QueryExpression object or a plain string representation of the condition. This function is responsible for generating the placeholders and replacing the values by them, while storing the value elsewhere for future binding.

protected _parseCondition(string $field, mixed $value) : ExpressionInterface
Parameters
$field : string

The value from which the actual field and operator will be extracted.

$value : mixed

The value to be bound to a placeholder for the field

Tags
throws
InvalidArgumentException

If operator is invalid or missing on NULL usage.

Return values
ExpressionInterface

_requiresToExpressionCasting()

Returns an array with the types that require values to be casted to expressions, out of the list of type names passed as parameter.

protected _requiresToExpressionCasting(array<string|int, mixed> $types) : array<string|int, mixed>
Parameters
$types : array<string|int, mixed>

List of type names

Return values
array<string|int, mixed>

        
On this page

Search results