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.
string $directory: The directory to scan.
\Traversable An \Traversable object or array where the values are \SplFileInfo objects.
protected function getDirectoryIterator($directory) { return new RegexDirectoryIterator($directory, '/\.yml$/i'); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!Discovery!YamlDirectoryDiscovery.php/function/YamlDirectoryDiscovery::getDirectoryIterator/8.1.x