Drupal investigation

DummyAdapter.php 1004B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Finder\Tests\FakeAdapter;
  11. use Symfony\Component\Finder\Adapter\AbstractAdapter;
  12. /**
  13. * @author Jean-François Simon <contact@jfsimon.fr>
  14. */
  15. class DummyAdapter extends AbstractAdapter
  16. {
  17. /**
  18. * @var \Iterator
  19. */
  20. private $iterator;
  21. /**
  22. * @param \Iterator $iterator
  23. */
  24. public function __construct(\Iterator $iterator)
  25. {
  26. $this->iterator = $iterator;
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function searchInDirectory($dir)
  32. {
  33. return $this->iterator;
  34. }
  35. /**
  36. * {@inheritdoc}
  37. */
  38. public function getName()
  39. {
  40. return 'yes';
  41. }
  42. /**
  43. * {@inheritdoc}
  44. */
  45. protected function canBeUsed()
  46. {
  47. return true;
  48. }
  49. }