TemplateDirIterator.php 497 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /*
  3. * This file is part of Twig.
  4. *
  5. * (c) Fabien Potencier
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. /**
  11. * @author Fabien Potencier <fabien@symfony.com>
  12. */
  13. class Twig_Util_TemplateDirIterator extends IteratorIterator
  14. {
  15. public function current()
  16. {
  17. return file_get_contents(parent::current());
  18. }
  19. public function key()
  20. {
  21. return (string) parent::key();
  22. }
  23. }