Callback returns true if all of the callbacks pass.

@param callable[] $filters
@return callable
765203
public static function all($filters) {
    return function ($node) use ($filters) {
      foreach ($filters as $filter) {
        if (!$filter($node)) {
          return FALSE;
        }
      }
      return TRUE;
    };
  }
336671
public function addFilter($filter)
    {
        if (!$filter instanceof FilterInterface) {
            if (!is_callable($filter)) {
                throw new \InvalidArgumentException('Filter should be callable or ' . FilterInterface::class);
            }

            $filter = new CallbackFilter($filter);
        }

        $this->filters[] = $filter;

        return $this;
    }
360543
public function setFilters($filters = [])
    {
        foreach ($filters as $key => $value) {
            $this->addFilter($key, $value);
        }

        return $this;
    }
1263956
public function list(array $filters = [])
    {
        return $this->curl->get($this->base_url.'?'.http_build_query([
                    'filters' => json_encode($filters),
                ]
            )
        );
    }
867356
protected function _setCallbackFilter($filter)
    {
        if (!is_callable($filter, true) && !is_null($filter)) {
            throw new InvalidArgumentException('Filter must be a callable');
        }

        $this->callbackFilter = $filter;

        return $this;
    }
444613
public function applyFilter($filter, $args = null)
    {
        $args = func_get_args();
        $args[0] = $this;
        return call_user_func_array(
            $filter instanceof Closure ? $filter : $this->getConnection()->getFilterCallback($filter),
            $args
        );
    }
692404
public function list(array $filters = [])
    {
        return self::$curl->get(self::$base_url.'?'.http_build_query(['filters' => json_encode($filters)]));
    }
808297
public function setFilter($filter = null)
    {
        $this->filter = is_callable($filter) ? $filter : null;

        return $this;
    }
173721
public function setFilters($filters)
    {
        if(is_null($filters)){
            $filters = "";
        }
        if (is_string($filters)) {
            $filters = $this->parseFilters($filters);
        }

        $this->filters = array_merge($this->filters, $filters);
    }
371255
public function setWhereAny($filters)
    {
        $filters = func_num_args() > 1 ? func_get_args() : $filters;
        return $this
            ->setWhere(array())
            ->addWhereAny($filters);
    }
271810
public function setFilters(array $filters)
    {
        if (empty($this->filters)) {
            $this->filters = $this->getDefaultFilters();
        }

        $this->filters = array_merge(
            $this->filters, $filters
        );

        return $this;
    }
1166458
public function filters(array $filters)
    {

        foreach ($filters as $name => $options) {
            $this->filter($name, $options);
        }

        return $this;
    }
715799
public function setFilters($filters)
    {
        if ($filters === null)
            $filters = [];
        else if (!is_array($filters))
            throw new \Exception('Filters should be null or array');

        foreach ($filters as $column => $filter) {
            $found = [];
            foreach ($this->getColumns() as $id => $params) {
                if ($id == $column) {
                    foreach ($filter as $name => $value) {
                        if (in_array($name, $params['filters']))
                            $found[$name] = $value;
                    }
                    break;
                }
            }

            if (count($found) > 0)
                $filters[$column] = $found;
            else
                unset($filters[$column]);
        }

        $this->filters = $filters;
        return $this;
    }
1180222
public function addFiltersWithAndToTable(iterable $filters): self
    {
        $addWith = $this->expr()->andX();
        $this->applyFilters($addWith, $this->getTableName(), $filters);
        $addWith->count() <= 0 ?: $this->andWhere($addWith);

        return $this;
    }
1327137
final public function filter(callable $filter, array $args = []): self
    {
        // Start a new Collection to collect the filtered results
        $collection = new Collection();

        // Iterate over current Collection
        iterator_apply(

            // Use $this object as the iterator
            $this,

            // Wrap callable in closure that alway returns true
            function(IteratorAggregate $iterator) use ($filter, $args, &$collection) {

                // Pass current element and optional arguments to callable
                if ($filter($iterator->current(), $args) === true) {

                    $collection->set(
                        $iterator->key(),
                        $iterator->current()
                    );
                }

                return true;
            },

            // Pass $this (again) to the function for reasons unbeknown to science
            // {@see https://www.reddit.com/r/lolphp/comments/5zkn29/what_the_hell_with_iterator_apply/}
            [$this->toArray()]
        );

        // Return filtered Collection
        return $collection;
    }
1282813
public function addFiltersWithAndToAlias(iterable $filters): self
    {
        $addWith = $this->expr()->andX();
        $this->applyFilters($addWith, $this->getAlias(), $filters);
        $addWith->count() <= 0 ?: $this->andWhere($addWith);

        return $this;
    }
701890
private function applyInputFilters($value, $filters)
    {
        foreach ($filters as $filter) {
            if (is_string($filter) && isset(self::$filterCallbacks[$filter])) {
                $value = call_user_func(self::$filterCallbacks[$filter], $value);
            }
        }
        return $value;
    }