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

        if ($this->getOption('ignore_vcs') && in_array($basename, self::$vcs_dirs)) {
            return false;
        }

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

        if ($max = $this->getOption('max_depth')) {
            if ($depth > $max) {
                return false;
            }
        }

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

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

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

        if ($this->getOption('ignore_vcs') && in_array($basename, self::$vcs_dirs)) {
            return false;
        }

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

        if ($max = $this->getOption('max_depth')) {
            if ($depth > $max) {
                return false;
            }
        }

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

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

        return true;
    }
protected function acceptDir ( $ basename , $ pathname , $ depth ) { if ( $ regex = $ this -> getOption ( 'dir_regex' ) ) { if ( ! preg_match ( $ regex , $ basename ) ) { return false ; } } if ( $ this -> getOption ( 'ignore_vcs' ) && in_array ( $ basename , self :: $ vcs_dirs ) ) { return false ; } if ( $ ignore = $ this -> getOption ( 'ignore_dirs' ) ) { if ( in_array ( $ basename , $ ignore ) ) { return false ; } } if ( $ max = $ this -> getOption ( 'max_depth' ) ) { if ( $ depth > $ max ) { return false ; } } if ( $ callback = $ this -> getOption ( 'accept_callback' ) ) { if ( ! call_user_func ( $ callback , $ basename , $ pathname , $ depth ) ) { return false ; } } if ( $ callback = $ this -> getOption ( 'accept_dir_callback' ) ) { if ( ! call_user_func ( $ callback , $ basename , $ pathname , $ depth ) ) { return false ; } } return true ; }
Returns TRUE if the directory should be traversed. This can be overloaded
to customise functionality, or extended with callbacks.

@param string $basename
@param string $pathname
@param int $depth
@return bool
Returns TRUE if the directory should be traversed . This can be overloaded to customise functionality or extended with callbacks .