function Finder::name
Adds rules that files must match.
You can use patterns (delimited with / sign), globs or simple strings.
$finder->name('/\.php$/') $finder->name('*.php') // same as above, without dot files $finder->name('test.php') $finder->name(['test.py', 'test.php'])
Parameters
string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns:
Return value
$this
See also
File
-
vendor/
symfony/ finder/ Finder.php, line 177
Class
- Finder
- Finder allows to build rules to find files and directories.
Namespace
Symfony\Component\FinderCode
public function name(string|array $patterns) : static {
$this->names = array_merge($this->names, (array) $patterns);
return $this;
}