| Methods |
final
public
|
__construct(EntityManagerInterface $em)
|
#
|
final
public
|
setParameterList(string $name, array<mixed> $values, string $type = Types::STRING): $this
Sets a parameter list that can be used by the filter.
Sets a parameter list that can be used by the filter.
Parameters
| $name |
Name of the parameter.
|
| $values |
List of parameter values.
|
| $type |
The parameter type. If specified, the given value will be run through
the type conversion of this type.
|
|
#
|
final
public
|
setParameter(string $name, mixed $value, string|null $type = null): $this
Sets a parameter that can be used by the filter.
Sets a parameter that can be used by the filter.
Parameters
| $name |
Name of the parameter.
|
| $value |
Value of the parameter.
|
| $type |
The parameter type. If specified, the given value will be run through
the type conversion of this type. This is usually not needed for
strings and numeric types.
|
|
#
|
final
public
|
getParameter(string $name): string
Gets a parameter to use in a query.
Gets a parameter to use in a query.
The function is responsible for the right output escaping to use the
value in a query.
Parameters
| $name |
Name of the parameter.
|
Returns
The SQL escaped parameter to use in a query.
Throws
|
#
|
final
public
|
getParameterList(string $name): string
Gets a parameter to use in a query assuming it's a list of entries.
Gets a parameter to use in a query assuming it's a list of entries.
The function is responsible for the right output escaping to use the
value in a query, separating each entry by comma to inline it into
an IN() query part.
Parameters
| $name |
Name of the parameter.
|
Returns
The SQL escaped parameter to use in a query.
Throws
|
#
|
final
public
|
hasParameter(string $name): bool
Checks if a parameter was set for the filter.
Checks if a parameter was set for the filter.
Parameters
| $name |
Name of the parameter.
|
|
#
|
final
public
|
__toString(): string
Returns as string representation of the SQLFilter parameters (the state).
Returns as string representation of the SQLFilter parameters (the state).
Returns
String representation of the SQLFilter.
|
#
|
final
protected
|
getConnection(): Connection
Returns the database connection used by the entity manager
Returns the database connection used by the entity manager
|
#
|
abstract
public
|
addFilterConstraint(ClassMetadata<object> $targetEntity, string $targetTableAlias): string
Gets the SQL query part to add to a query.
Gets the SQL query part to add to a query.
Returns
The constraint SQL if there is available, empty string otherwise.
|
#
|