TemplateNameParserInterface.php 781 B

123456789101112131415161718192021222324252627282930
  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\Templating;
  11. /**
  12. * TemplateNameParserInterface converts template names to TemplateReferenceInterface
  13. * instances.
  14. *
  15. * @author Fabien Potencier <fabien@symfony.com>
  16. */
  17. interface TemplateNameParserInterface
  18. {
  19. /**
  20. * Convert a template name to a TemplateReferenceInterface instance.
  21. *
  22. * @param string|TemplateReferenceInterface $name A template name or a TemplateReferenceInterface instance
  23. *
  24. * @return TemplateReferenceInterface A template
  25. */
  26. public function parse($name);
  27. }