Finder::name()

Finder|SplFileInfo[] name(string $pattern)

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 $finder->name('test.php')

Parameters

string $pattern A pattern (a regexp, a glob, or a string)

Return Value

Finder|SplFileInfo[] The current Finder instance

See also

FilenameFilterIterator
doc_Symfony
2016-10-28 06:16:54
Comments
Leave a Comment

Please login to continue.