You are here

public function HIncludeFragmentRenderer::setTemplating in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php \Symfony\Component\HttpKernel\Fragment\HIncludeFragmentRenderer::setTemplating()

Sets the templating engine to use to render the default content.

Parameters

EngineInterface|\Twig_Environment|null $templating An EngineInterface or a \Twig_Environment instance:

Throws

\InvalidArgumentException

1 call to HIncludeFragmentRenderer::setTemplating()
HIncludeFragmentRenderer::__construct in vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php
Constructor.

File

vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php, line 55

Class

HIncludeFragmentRenderer
Implements the Hinclude rendering strategy.

Namespace

Symfony\Component\HttpKernel\Fragment

Code

public function setTemplating($templating) {
  if (null !== $templating && !$templating instanceof EngineInterface && !$templating instanceof \Twig_Environment) {
    throw new \InvalidArgumentException('The hinclude rendering strategy needs an instance of \\Twig_Environment or Symfony\\Component\\Templating\\EngineInterface');
  }
  $this->templating = $templating;
}