protected function acceptFile($basename, $pathname, $depth)
    {
        if ($regex = $this->getOption('name_regex')) {
            if (!preg_match($regex, $basename)) {
                return false;
            }
        }

        if ($ignore = $this->getOption('ignore_files')) {
            if (in_array($basename, $ignore)) {
                return false;
            }
        }

        if ($minDepth = $this->getOption('min_depth')) {
            if ($depth < $minDepth) {
                return false;
            }
        }

        if ($callback = $this->getOption('accept_callback')) {
            if (!call_user_func($callback, $basename, $pathname, $depth)) {
                return false;
            }
        }

        if ($callback = $this->getOption('accept_file_callback')) {
            if (!call_user_func($callback, $basename, $pathname, $depth)) {
                return false;
            }
        }

        return true;
    }
protected function acceptFile($basename, $pathname, $depth)
    {
        if ($regex = $this->getOption('name_regex')) {
            if (!preg_match($regex, $basename)) {
                return false;
            }
        }

        if ($ignore = $this->getOption('ignore_files')) {
            if (in_array($basename, $ignore)) {
                return false;
            }
        }

        if ($minDepth = $this->getOption('min_depth')) {
            if ($depth < $minDepth) {
                return false;
            }
        }

        if ($callback = $this->getOption('accept_callback')) {
            if (!call_user_func($callback, $basename, $pathname, $depth)) {
                return false;
            }
        }

        if ($callback = $this->getOption('accept_file_callback')) {
            if (!call_user_func($callback, $basename, $pathname, $depth)) {
                return false;
            }
        }

        return true;
    }
protected function acceptFile ( $ basename , $ pathname , $ depth ) { if ( $ regex = $ this -> getOption ( 'name_regex' ) ) { if ( ! preg_match ( $ regex , $ basename ) ) { return false ; } } if ( $ ignore = $ this -> getOption ( 'ignore_files' ) ) { if ( in_array ( $ basename , $ ignore ) ) { return false ; } } if ( $ minDepth = $ this -> getOption ( 'min_depth' ) ) { if ( $ depth < $ minDepth ) { return false ; } } if ( $ callback = $ this -> getOption ( 'accept_callback' ) ) { if ( ! call_user_func ( $ callback , $ basename , $ pathname , $ depth ) ) { return false ; } } if ( $ callback = $ this -> getOption ( 'accept_file_callback' ) ) { if ( ! call_user_func ( $ callback , $ basename , $ pathname , $ depth ) ) { return false ; } } return true ; }
Returns TRUE if the file should be included in the results. This can be
overloaded to customise functionality, or extended via callbacks.

@param string $basename
@param string $pathname
@param int $depth
@return bool
Returns TRUE if the file should be included in the results . This can be overloaded to customise functionality or extended via callbacks .