EngineInterface.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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\Bundle\FrameworkBundle\Templating;
  11. use Symfony\Component\HttpFoundation\Response;
  12. use Symfony\Component\Templating\EngineInterface as BaseEngineInterface;
  13. /**
  14. * EngineInterface is the interface each engine must implement.
  15. *
  16. * @author Fabien Potencier <fabien@symfony.com>
  17. */
  18. interface EngineInterface extends BaseEngineInterface
  19. {
  20. /**
  21. * Renders a view and returns a Response.
  22. *
  23. * @param string $view The view name
  24. * @param array $parameters An array of parameters to pass to the view
  25. * @param Response $response A Response instance
  26. *
  27. * @return Response A Response instance
  28. *
  29. * @throws \RuntimeException if the template cannot be rendered
  30. */
  31. public function renderResponse($view, array $parameters = array(), Response $response = null);
  32. }