StreamingEngineInterface.php 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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. * StreamingEngineInterface provides a method that knows how to stream a template.
  13. *
  14. * @author Fabien Potencier <fabien@symfony.com>
  15. */
  16. interface StreamingEngineInterface
  17. {
  18. /**
  19. * Streams a template.
  20. *
  21. * The implementation should output the content directly to the client.
  22. *
  23. * @param string|TemplateReferenceInterface $name A template name or a TemplateReferenceInterface instance
  24. * @param array $parameters An array of parameters to pass to the template
  25. *
  26. * @throws \RuntimeException if the template cannot be rendered
  27. * @throws \LogicException if the template cannot be streamed
  28. */
  29. public function stream($name, array $parameters = array());
  30. }