PHP Class Bolt\Storage\Query\Filter

@author Ross Riley
Exibir arquivo Open project: bolt/bolt Class Usage Examples

Protected Properties

Property Type Description
$expression Doctrine\DBAL\Query\Expression\CompositeExpression
$key
$parameters array

Public Methods

Method Description
getExpression ( ) : string Gets the compiled expression as a string. This will look something like (alias.key = :placeholder).
getExpressionObject ( ) : CompositeExpression Returns the actual object of the expression. This is generally only needed for on the fly modification, to get the compiled expression use getExpression().
getKey ( ) : string Getter for key.
getParameters ( ) : array Returns the array of parameters attached to this filter. These are normally used to replace placeholders at compile time.
hasParameter ( string $param ) : boolean Helper method to check if parameters are set for a specific key.
setExpression ( CompositeExpression $expression ) Allows replacing the expression object with a modified one.
setKey ( string $key ) Sets the key that this filter affects.
setParameter ( string $param, mixed $value ) Allows setting a parameter for a single key.
setParameters ( array $parameters ) Setter method to replace parameters.

Method Details

getExpression() public method

Gets the compiled expression as a string. This will look something like (alias.key = :placeholder).
public getExpression ( ) : string
return string

getExpressionObject() public method

Returns the actual object of the expression. This is generally only needed for on the fly modification, to get the compiled expression use getExpression().
public getExpressionObject ( ) : CompositeExpression
return Doctrine\DBAL\Query\Expression\CompositeExpression

getKey() public method

Getter for key.
public getKey ( ) : string
return string

getParameters() public method

Returns the array of parameters attached to this filter. These are normally used to replace placeholders at compile time.
public getParameters ( ) : array
return array

hasParameter() public method

Helper method to check if parameters are set for a specific key.
public hasParameter ( string $param ) : boolean
$param string
return boolean

setExpression() public method

Allows replacing the expression object with a modified one.
public setExpression ( CompositeExpression $expression )
$expression Doctrine\DBAL\Query\Expression\CompositeExpression

setKey() public method

Sets the key that this filter affects.
public setKey ( string $key )
$key string

setParameter() public method

Allows setting a parameter for a single key.
public setParameter ( string $param, mixed $value )
$param string
$value mixed

setParameters() public method

Setter method to replace parameters.
public setParameters ( array $parameters )
$parameters array

Property Details

$expression protected_oe property

protected CompositeExpression,Doctrine\DBAL\Query\Expression $expression
return Doctrine\DBAL\Query\Expression\CompositeExpression

$key protected_oe property

protected $key

$parameters protected_oe property

protected array $parameters
return array