1
0
mirror of synced 2025-01-18 22:41:43 +03:00

Merge pull request #963 from mdemo/master

SQLFilter -- allows to check if a parameter was set
This commit is contained in:
Benjamin Eberlei 2014-03-23 15:33:14 +01:00
commit 71fc425902

View File

@ -107,6 +107,22 @@ abstract class SQLFilter
return $this->em->getConnection()->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']);
}
/**
* Checks if a parameter was set for the filter.
*
* @param string $name Name of the parameter.
*
* @return boolean
*/
final public function hasParameter($name)
{
if (!isset($this->parameters[$name])) {
return false;
}
return true;
}
/**
* Returns as string representation of the SQLFilter parameters (the state).
*