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;
    }
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;
    }
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 ; }
Assigns the filter that is optionally used to filter files.

@since [*next-version*]

@param callable|null $filter The callback.

@throws InvalidArgumentException If the filter is not a callable.

@return $this
Assigns the filter that is optionally used to filter files .