Remove a filter

@param string $filter   The name of the filter
@return  bool   Returns TRUE if the filter was detached, FALSE otherwise
193945
public function removeFilter($filter)
    {
        $result = false;
        if(!is_resource($filter) && isset($this->_filters[$filter])){
            $filter = $this->_filters[$filter];
        }

        if(is_resource($filter)) {
            $result = stream_filter_remove($filter);
        }

        return $result;
    }
646272
public function remove(string $key)
    {
        // check if the $key is an alias
        if (isset($this->aliases[$key])) {
            $alias = $key;
            $key = $this->aliases[$key];
            unset($this->aliases[$alias]);
        }

        // if the key exists as a factory
        if ($this->hasFactory($key)) {
            unset($this->definitions['factory'][$key]);
            $this->removeAliasFor($key);
            return ! $this->hasFactory($key);
        }

        // if the key exists as an object
        if ($this->hasObject($key)) {
            unset($this->definitions['instance'][$key], $this->store[$key]);
            $this->removeAliasFor($key);
            return ! ($this->hasObject($key) || $this->hasStored($key));
        }

        // the key did not exist
        return false;
    }
861339
public static function filterByList($filter)
    {
        $operator = Arr::get($filter, 'operator');
        $method = Arr::get($filter, 'method');
        $arguments = Arr::get($filter, 'arguments');
        $value_one = Arr::get($filter, 'value_one');
        $value_two = Arr::get($filter, 'value_two');
        $settings = Arr::get($filter, 'settings');
        $positive = Arr::get($filter, 'positive');

        switch ($operator) {
            case 'IN':
                $method = 'whereIn';
                $arguments = [$value_one];
                break;
            case 'NOT_IN':
                $method = 'whereNotIn';
                $arguments = [$value_one];
                break;
        }

        return [
            'operator'  => $operator,
            'method'    => $method,
            'arguments' => $arguments,
            'value_one' => $value_one,
            'value_two' => $value_two,
            'settings'  => $settings,
            'positive'  => $positive,
        ];
    }
644005
protected function convertToFilterFormat($filter)
    {
        $filter = trim($filter);
        if (substr($filter, 0, 1) != '(') {
            $filter = '(' . $filter;
        }
        if (substr($filter, -1) != ')') {
            $filter = $filter . ')';
        }
        return $filter;
    }
682686
function removeFilter(iFilterStream $filter)
    {
        $filterName = $filter->getLabel();
        if (isset($this->attachedFilters[$filterName])) {
            $filterRes = $this->attachedFilters[$filterName];

            stream_filter_remove($filterRes);
            unset($this->attachedFilters[$filterName]); // filter was removed
        }

        return $this;
    }
366436
public function filter(/*Callable*/ $filter)
    {
        $result = clone $this;
        foreach ($this as $object)
        {
            if (call_user_func($filter, $object) === false) {
                $result->remove($object);
            }
        }

        return $result;
    }
79381
public void removeFilter(AbstractLogFilter<E> filter) {
                Validate.notNull(filter);
                filters.remove(filter);
                uptodate = false;
                filter.deleteObserver(this);
        }
552727
public function removeAlias($alias)
    {
        if (isset($this->aliases[$alias])) {
            unset($this->aliases[$alias]);
            return true;
        }

        return false;
    }
731620
public function withFilter($filter) {
        if (!in_array($filter, [self::ALL, self::ANY, self::SOME, self::EXISTS, self::NOT_EXISTS, self::IN, self::NOT_IN], true)) {
            throw new InvalidArgumentException('Invalid filter type for sub-query');
        }

        $this->_filter = $filter;

        return $this;
    }
1120823
public function remove($filter)
    {
        $index = $this->indexOf($filter);

        if ($index > -1) {
            $this->offsetUnset($index);
        }

        return $this;
    }
279298
public static function deleteCustomers($filter = array())
    {
        $filter = Filter::create($filter);
        return self::deleteResource('/customers' . $filter->toQuery());
    }
96906
public function setFilter($filter)
    {
        if (strtolower($this->env->get('REQUEST_METHOD')) == 'put' || strtolower($this->env->get('REQUEST_METHOD')) == 'delete') {
            //put方法
            $body = file_get_contents('php://input');
            $bodys = [];
            parse_str($body, $bodys);
            $_POST = array_merge($bodys, $_POST);
        }
        $this->body->import(Filter::factory($_POST, $filter));
        $this->query->import(Filter::factory($_GET, $filter));
        return $this;
    }
731557
public function delete($table, $filter = '', array $params = []): bool
    {
        $query = [
            'table' => $table,
            'method' => 'DELETE'
        ];
        
        if ($filter) {
            $query['filter'] = $filter;
            
            if ($params) {
                $query['params'] = $params;
            }
        }
        
        $this->qb($query, true);
        
        return true;
    }
346059
public static function filterByString($filter)
    {
        $operator = Arr::get($filter, 'operator');
        $method = Arr::get($filter, 'method');
        $arguments = Arr::get($filter, 'arguments');
        $value_one = Arr::get($filter, 'value_one');
        $value_two = Arr::get($filter, 'value_two');
        $settings = Arr::get($filter, 'settings');
        $positive = Arr::get($filter, 'positive');

        switch ($operator) {
            case '=':
            case '!=':
                $arguments = [$operator, $value_one];
                break;
            case '*=*':
            case '*!=*':
                $operator = (stripos($operator, '!') !== false) ? 'not ' : '';
                $operator .= 'like';
                $arguments = [$operator, '%'.$value_one.'%'];
                break;
            case '*=':
            case '*!=':
                $operator = (stripos($operator, '!') !== false) ? 'not ' : '';
                $operator .= 'like';
                $arguments = [$operator, '%'.$value_one];
                break;
            case '=*':
            case '!=*':
                $operator = (stripos($operator, '!') !== false) ? 'not ' : '';
                $operator .= 'like';
                $arguments = [$operator, $value_one.'%'];
                break;
            case 'EMPTY':
                $method = 'whereRaw';
                $arguments = "%s = ''";
                break;
            case 'NOT_EMPTY':
                $method = 'whereRaw';
                $arguments = "%s != ''";
                break;
            case 'IN':
                $method = 'whereIn';
                $arguments = [static::getListFromString($value_one)];
                break;
            case 'NOT_IN':
                $method = 'whereNotIn';
                $arguments = [static::getListFromString($value_one)];
                break;
            case 'NULL':
                $method = 'whereNull';
                break;
            case 'NOT_NULL':
                $method = 'whereNotNull';
                break;
        }

        return [
            'operator'  => $operator,
            'method'    => $method,
            'arguments' => $arguments,
            'value_one' => $value_one,
            'value_two' => $value_two,
            'settings'  => $settings,
            'positive'  => $positive,
        ];
    }
1134633
public function is($filter): bool
    {
        if ($filter instanceof Entity) {
            return $this->isSameAsEntity($filter);
        }

        if (is_associative_array($filter)) {
            return $this->matchesFilter($filter);
        }

        return $this->matchedId($filter);
    }
647953
protected function _cleanFilter($aFilter)
    {
        $aCleanFilter = false;
        if (is_array($aFilter) && count($aFilter)) {
            foreach ($aFilter as $iKey => $sFilter) {
                if ($sFilter) {
                    $aCleanFilter[$iKey] = $sFilter;
                }
            }
        }

        return $aCleanFilter;
    }
365006
public function getFilter($filter)
    {
        $result = null;

        if(isset($this->__filters[$filter])) {
            $result = $this->__filters[$filter];
         }

        return $result;
    }