Lines Matching refs:comp
165 * @param string $comp @see self::COMPARATORS
168 public function addFilter($colname, $value, $comp, $op = 'OR')
170 $filter = $this->createFilter($colname, $value, $comp, $op);
179 * @param string $comp @see self::COMPARATORS
182 public function addDynamicFilter($colname, $value, $comp, $op = 'OR')
184 $filter = $this->createFilter($colname, $value, $comp, $op);
193 * @param string $comp @see self::COMPARATORS
195 * @return array|null [Column col, string|string[] value, string comp, string op]
197 protected function createFilter($colname, $value, $comp, $op = 'OR')
201 if ($comp == '*~') {
203 $comp = '~';
204 } elseif ($comp == '<>') {
205 $comp = '!=';
208 if (!in_array($comp, self::$COMPARATORS))
217 switch ($comp) {
219 $comp = 'LIKE';
222 $comp = 'NOT LIKE';
225 $comp = 'REGEXP';
230 if ($comp == 'LIKE' || $comp == 'NOT LIKE') {
234 if ($comp == ' IN ' && !is_array($value)) {
237 $comp = '=';
241 return [$col, $value, $comp, $op];