Overwrites all the view data

@param array   $data
@param boolean $filter

@return $this
198708
public function replaceData(array $data, $filter = null)
	{
		$this->clearData();

		return $this->set($data, $filter);
	}
373609
public function setFilter($filter)
    {
        if (!in_array($filter, $this->allowedFilters)) {
            throw new \Zend_Validate_Exception('Invalid param filter.');
        }

        $this->filter = (int) $filter;
        return $this;
    }
637
public function setFilters($filters)
    {
        if (! is_array($filters))
            $filters = [$filters];

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

        return $this;
    }
735773
public function setFilterData($data)
    {
        foreach ($data as $index => $config) {
            if (is_object($config)) {
                $config = get_object_vars($config);
            }
            $filter = new \Expose\Filter($config);
            $this->addFilter($filter);
        }
    }
360543
public function setFilters($filters = [])
    {
        foreach ($filters as $key => $value) {
            $this->addFilter($key, $value);
        }

        return $this;
    }
527886
public function applyFilters($filters)
    {
        foreach ($filters as $key => $value) {
            $this->filters[$key] = $value;
        }

        return $this;
    }
769308
public function overwriteWith($data)
    {
        if (is_array($data)) {
            $this->data = $data + $this->data;
        } elseif ($data instanceof Collection) {
            $this->data = $data->toArray() + $this->data;
        } else {
            foreach ($data as $key => $value) {
                $this->data[$key] = $value;
            }
        }

        return $this;
    }
223374
public static function create($filter = array())
    {
        if ($filter instanceof self) {
            return $filter;
        }

        if (is_int($filter)) {
            $filter = array('page' => $filter);
        }

        return new self($filter);
    }
1074552
public function whereRaw($filter, $bind = null)
    {
        $this->_conditions[] = $filter;

        if ($bind !== null) {
            $this->_bind = array_merge($this->_bind, $bind);
        }

        return $this;
    }
435144
public function set_filter_values($filter, array $values = []) {
        $allvalues = (array) $this->get_config('filtervalues', []);
        $allvalues[$filter] = $values;

        return $this->set_config('filtervalues', $allvalues);
    }
1336104
public function setFilterable($filterable = true)
    {
        foreach ($this->results as $name) {
            $this->columns->offsetGet($name)->setFilterable($filterable);
        }

        return $this;
    }
1345549
public function filter($filter)
    {
        if (is_array($filter)) {
            $filter = new GridFilter($filter);
        }

        if ($filter instanceof FilterSpecification) {
            $filter = new GridFilter($filter->asFilter());
        }

        $this->filter = $filter;

        return $this;
    }
808297
public function setFilter($filter = null)
    {
        $this->filter = is_callable($filter) ? $filter : null;

        return $this;
    }
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;
    }
1233216
public function where($filter, $value = null)
    {
        foreach ($this->queries as $query) {
            $query->where($filter, $value);
        }

        return $this;
    }
539560
public function applyFromArray($filters)
    {
        foreach ($filters as $key => $value)
        {
            $filter = $this->factory->get('filter')->make(is_callable($value) ? $key : $value)->setResource($this);

            is_callable($value) and call_user_func($value, $filter);

            $this->filters[$filter->getFilter()] = $filter;
        }

        return $this;
    }
970149
public static function filter(array $data, $filter): array
    {
        if (!$filter) {
            return $data;
        }

        if (is_callable($filter)) {
            return array_filter($data, $filter);
        }

        if ($filter & self::FILTER_NULL) {
            return array_filter(
                $data,
                function ($value) {
                    return $value !== null;
                }
            );
        } elseif ($filter & self::FILTER_EMPTY) {
            return array_filter(
                $data,
                function ($value) {
                    return isset($value[0]);
                }
            );
        } elseif ($filter & self::FILTER_PHP) {
            return array_filter($data);
        }

        return $data;
    }