12 namespace Symfony\Component\Finder\Iterator;
29 public function __construct(\Iterator $iterator, array $directories)
31 foreach ($directories as $directory) {
32 $this->patterns[] =
'#(^|/)'.preg_quote($directory,
'#').
'(/|$)#';
35 parent::__construct($iterator);
45 $path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath();
46 $path = str_replace(
'\\',
'/', $path);
47 foreach ($this->patterns as $pattern) {
48 if (preg_match($pattern, $path)) {