Attaches the current filter to a stream.

@return bool true on success or false on failure.
552839
public function register()
    {
        if (!$this->isRegistered) {
            $this->isRegistered = stream_filter_register(static::NAME, get_called_class());
        }

        return $this->isRegistered;
    }
629882
public function isStreamWrapped()
	{
		$maybeStreamWrapped = $this->partCount > 1 && $this->firstPart !== '' && $this->parts[1] === '' && ':' === substr($this->firstPart, -1);
		if (! $maybeStreamWrapped) {
			return false;
		}
		$name = substr($this->firstPart, 0, -1);
		return in_array($name, stream_get_wrappers());
	}
590350
public function accept()
    {
        static $callable = null;

        $file = $this->getInnerIterator()->current();

        if (isset($callable)) {
            return $callable ? $this->filters[$this->options['filter_key']]['handlers']['filter']($file, $this->options['filter_value']) : true;
        }

        if (empty($this->filters[$this->options['filter_key']]['handlers']['filter'])) {
            $callable = false;
            return true;
        }

        $function = $this->filters[$this->options['filter_key']]['handlers']['filter'];

        if (!is_callable($function)) {
            $callable = false;
            return true;
        }

        $callable = true;
        return $function($file, $this->options['filter_value']);
    }
170216
private function filter()
    {
        $containerData = $this->getDataProvider();
        $whereExpression = $this->_where;
        
        if (empty($whereExpression)) {
            $data = $containerData;
        } else {
            $data = array_filter($containerData, function ($item) {
                foreach ($item as $field => $value) {
                    if (!$this->arrayFilter($value, $field)) {
                        return false;
                    }
                }
        
                return true;
            });
        }
        
        if ($this->_offset !== null) {
            $data = array_slice($data, $this->_offset, null, true);
        }

        if ($this->_limit !== null) {
            $data = array_slice($data, 0, $this->_limit, true);
        }
        
        if ($this->_binds) {
            foreach ($this->_binds as $id => $values) {
                if (isset($data[$id])) {
                    $data[$id] = array_merge($data[$id], $values);
                }
            }
        }

        return $data;
    }
1031202
private function applyFilters()
    {
        $layer      = $this->layerResolver->get();
        $filterList = $this->getFilterList();

        foreach ($filterList->getFilters($layer) as $filter) {
            $filter->apply($this->getRequest());
        }

        $layer->apply();

        return $this;
    }
20527
public function accept()
    {
        if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) {
            return false;
        }

        if ($this->excludedPattern) {
            $path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath();
            $path = str_replace('\\', '/', $path);

            return !preg_match($this->excludedPattern, $path);
        }

        return true;
    }
749454
protected function addBasicPurgeFilters() {
        if ($this->purgeFiltersInitialized) {
            return;
        }

        $this->purgeFilters[] = function ($attributeKey) {
            // disallow password confirmation fields
            if (Str::endsWith($attributeKey, '_confirmation')) {
                return false;
            }

            // "_method" is used by Fly\Routing\Router to simulate custom HTTP verbs
            if (strcmp($attributeKey, '_method') === 0) {
                return false;
            }

            // "_token" is used by Fly\Html\FormBuilder to add CSRF protection
            if (strcmp($attributeKey, '_token') === 0) {
                return false;
            }

            return true;
        };

        $this->purgeFiltersInitialized = true;
    }
1322929
public function stream_flush()
    {
        if (!$this->getResource()) {
            return false;
        }

        $buffer = $this->getDataBuffer();
        $bufferWritten = $buffer;
        $retVal = true;
        if (!empty($buffer)) {

            $object = $this->getResource()->getObject();
            $mimetype = $this->getService()->guessFileType($this->getResource()->getResourceName());
            $object->content_type = $mimetype;
            $object->setData($buffer);
            $object->Create();
        }

       if (strlen($bufferWritten) ==  strlen($buffer)) {
            $this->setDataBuffer(null);
        } else {
            $this->setDataBuffer($buffer);
        }
        $this->setDataBuffer(null);

        return $retVal;
    }
1270814
public static function unpatch()
    {
        if (!static::$_interceptor) {
            return true;
        }
        $patchers = static::$_interceptor->patchers();
        $patchers->remove('filter');
        static::$_interceptor = null;

        if (static::$_unpatch) {
            static::$_unpatch = false;
            return Interceptor::unpatch();
        }
        return true;
    }
841031
public function getFilters()
    {
        $input = $this->collection->make(
            $this->request->except($this->sortName));

        $filters = $this->collection->make();

        $input->filter(function ($value) {
            if ($this->ignoreEmptyFilters && is_string($value) &&
                (string) $value == ''
            ) {
                return false;
            }

            return true;
        })->each(function ($value, $field) use ($filters) {
            $filter = new Filter();
            $filter->setField($field);
            $filter->setValue($value);
            $filters->push($filter);
        });

        return $filters;
    }
239370
private function getStream() {

        if(!feof($this->loader->getFile())) {
            $this->stream .= fread($this->loader->getFile(), $this->loader->getBytes());
            return true;
        }

        return false;

    }
691376
public function isFiltered()
    {
        if (!$this->adapter instanceof FilteredAdapter) {
            return false;
        }

        $filteredAdapter = $this->adapter;
        $filteredAdapter->isFiltered();
    }
488986
public function filterStills()
    {
        return $this->filter(
            function ($key, $value) {
                if ($value instanceof ImageFilter && $value instanceof Image\StillImage) {
                    return true;
                }
            }
        );
    }
920775
public function accept() : bool
    {
        $current = $this->current();

        if (!$this->includeHidden && $current->getFilename(){0} == '.') {
            return false;
        }

        if ($this->fileExtensions && $current->isFile() && !in_array($current->getExtension(), $this->fileExtensions)) {
            return false;
        }
        return true;
    }
820606
protected function addFilters()
    {
        if ($this->parser->getFilters()) {

            $this->query->whereRaw($this->parser->getFilters());
        }

        return $this;
    }
617846
public function isStream()
    {
        if ($this->data instanceof StreamInterface) {
            return true;
        }

        if (!is_resource($this->data)) {
            return false;
        }

        if (get_resource_type($this->data) !== 'stream') {
            return false;
        }

        return true;
    }
875826
public static function register()
    {
        if (!in_array(self::FILTERNAME, stream_get_filters(), true)) {
            stream_filter_register(self::FILTERNAME, self::class);
        }
    }