Finder::contains()

Finder|SplFileInfo[] contains(string $pattern)

Adds tests that file contents must match.

Strings or PCRE patterns can be used:

$finder->contains('Lorem ipsum') $finder->contains('/Lorem ipsum/i')

Parameters

string $pattern A pattern (string or regexp)

Return Value

Finder|SplFileInfo[] The current Finder instance

See also

FilecontentFilterIterator
doc_Symfony
2016-10-28 06:16:50
Comments
Leave a Comment

Please login to continue.