diff --git a/lib/Skeleton/Pager/Sql/Condition.php b/lib/Skeleton/Pager/Sql/Condition.php index d735fcb..d8459a5 100644 --- a/lib/Skeleton/Pager/Sql/Condition.php +++ b/lib/Skeleton/Pager/Sql/Condition.php @@ -258,7 +258,7 @@ public function equals(\Skeleton\Pager\Sql\Condition $condition) { * @return bool */ public function evaluate($value) { - switch ($this->comparison) { + switch (strtolower($this->comparison)) { case '': case '=': foreach ($this->value as $value_item) { @@ -303,6 +303,16 @@ public function evaluate($value) { } } return false; + case 'not in': + if (in_array($value, $this->value) === false) { + return true; + } + return false; + case 'in': + if (in_array($value, $this->value) === true) { + return true; + } + return false; default: throw new \Exception("Unsupported comparison operator: '" . $this->comparison . "'"); }