Filter
class Filter (View source)
This class represents a single filter that converts to an expression along with associated query values.
Properties
protected | $key | ||
protected Composite | $expression | ||
protected array | $parameters |
Methods
Sets the key that this filter affects.
Getter for key.
Gets the compiled expression as a string. This will look
something like (alias.key = :placeholder)
.
Allows replacing the expression object with a modified one.
Returns the actual object of the expression. This is generally only needed for on the fly modification, to get the compiled expression use getExpression().
Returns the array of parameters attached to this filter. These are normally used to replace placeholders at compile time.
Setter method to replace parameters.
Helper method to check if parameters are set for a specific key.
Allows setting a parameter for a single key.
Details
void
setKey(string|array $key)
Sets the key that this filter affects.
string|array
getKey()
Getter for key.
string
getExpression()
Gets the compiled expression as a string. This will look
something like (alias.key = :placeholder)
.
void
setExpression(Composite $expression)
Allows replacing the expression object with a modified one.
Composite
getExpressionObject()
Returns the actual object of the expression. This is generally only needed for on the fly modification, to get the compiled expression use getExpression().
array
getParameters()
Returns the array of parameters attached to this filter. These are normally used to replace placeholders at compile time.
void
setParameters(array $parameters)
Setter method to replace parameters.
bool
hasParameter(string $param)
Helper method to check if parameters are set for a specific key.
void
setParameter(string $param, $value)
Allows setting a parameter for a single key.