protected YamlDirectoryDiscovery::getDirectoryIterator($directory)
Gets an iterator to loop over the files in the provided directory.
This method exists so that it is easy to replace this functionality in a class that extends this one. For example, it could be used to make the scan recursive.
Parameters
string $directory: The directory to scan.
Return value
\Traversable An \Traversable object or array where the values are \SplFileInfo objects.
File
- core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php, line 155
Class
- YamlDirectoryDiscovery
- Discovers multiple YAML files in a set of directories.
Namespace
Drupal\Component\Discovery
Code
1 2 3 | protected function getDirectoryIterator( $directory ) { return new RegexDirectoryIterator( $directory , '/\.yml$/i' ); } |
Please login to continue.