FileIteratorFactory.php 837 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Framework\Config;
  8. /**
  9. * @api
  10. * @since 100.0.2
  11. */
  12. class FileIteratorFactory
  13. {
  14. /**
  15. * @var \Magento\Framework\Filesystem\File\ReadFactory
  16. */
  17. private $fileReadFactory;
  18. /**
  19. * Constructor
  20. *
  21. * @param \Magento\Framework\Filesystem\File\ReadFactory $fileReadFactory
  22. */
  23. public function __construct(\Magento\Framework\Filesystem\File\ReadFactory $fileReadFactory)
  24. {
  25. $this->fileReadFactory = $fileReadFactory;
  26. }
  27. /**
  28. * Create file iterator
  29. *
  30. * @param array $paths List of absolute paths
  31. * @return FileIterator
  32. */
  33. public function create($paths)
  34. {
  35. return new FileIterator($this->fileReadFactory, $paths);
  36. }
  37. }