Merge pull request #3112 from Icinga/fix/filter-hints-for-ide-3111

Filter: new abstract methode and better IDE hints
This commit is contained in:
lippserd 2017-11-21 16:50:45 +01:00 committed by GitHub
commit a840a6d1f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -33,6 +33,14 @@ abstract class Filter
abstract public function orFilter(Filter $filter);
/**
* Whether the give row matches this Filter
*
* @param mixed $row Preferrably an stdClass instance
* @return bool
*/
abstract public function matches($row);
public function getUrlParams()
{
return UrlParams::fromQueryString($this->toQueryString());
@ -133,7 +141,7 @@ abstract class Filter
* @param string $filter Filter expression
*
* @throws FilterException
* @return FilterWhere
* @return FilterExpression
*/
public static function where($col, $filter)
{