public function accept() { $callback = $this->callback; return $callback(parent::current(), parent::key(), parent::getInnerIterator()); }
public function accept() { return call_user_func($this->callback, parent::current(), parent::key(), parent::getInnerIterator()); }
/** * {@inheritdoc} */ public function accept() { /* @var $current SplFileInfo */ $current = parent::current(); $filename = $current->getFilename(); if ($current->isFile()) { if ($this->dirsOnly) { return false; } $ignoreFiles = array_merge($this->ignoreFiles, $this->ignoreFilesRecursive); foreach ($ignoreFiles as $ignore) { if (fnmatch($ignore, $filename)) { return false; } } } if ($current->isDir()) { $ignoreDirs = array_merge($this->ignoreDirs, $this->ignoreDirsRecursive); foreach ($ignoreDirs as $ignore) { if (fnmatch($ignore, $filename)) { return false; } } } if ($this->ignoreSystemStuff) { foreach (self::$systemStuff as $systemStuff) { if (stripos($filename, $systemStuff) === 0) { return false; } } } return true; }