mediatekformation

TwigEngine extends TwigEngine
in package
implements EngineInterface

This engine renders Twig templates.

Tags
author

Fabien Potencier fabien@symfony.com

deprecated

since version 4.3, to be removed in 5.0; use Twig instead.

Interfaces, Classes, Traits and Enums

EngineInterface
EngineInterface is the interface each engine must implement.

Table of Contents

$environment  : mixed
$locator  : mixed
$parser  : mixed
__construct()  : mixed
exists()  : mixed
{@inheritdoc}
render()  : mixed
{@inheritdoc}
renderResponse()  : Response
Renders a view and returns a Response.
stream()  : mixed
{@inheritdoc}
supports()  : mixed
{@inheritdoc}
load()  : Template
Loads the given template.

Properties

Methods

exists()

{@inheritdoc}

public exists(mixed $name) : mixed

It also supports Template as name parameter.

Parameters
$name : mixed
Return values
mixed

render()

{@inheritdoc}

public render(mixed $name[, array<string|int, mixed> $parameters = [] ]) : mixed

It also supports Template as name parameter.

Parameters
$name : mixed
$parameters : array<string|int, mixed> = []
Tags
throws
Error

if something went wrong like a thrown exception while rendering the template

Return values
mixed

renderResponse()

Renders a view and returns a Response.

public renderResponse(mixed $view[, array<string|int, mixed> $parameters = [] ][, Response $response = null ]) : Response
Parameters
$view : mixed

The view name

$parameters : array<string|int, mixed> = []

An array of parameters to pass to the view

$response : Response = null
Tags
throws
Error

if something went wrong like a thrown exception while rendering the template

Return values
Response

A Response instance

stream()

{@inheritdoc}

public stream(mixed $name[, array<string|int, mixed> $parameters = [] ]) : mixed

It also supports Template as name parameter.

Parameters
$name : mixed
$parameters : array<string|int, mixed> = []
Tags
throws
Error

if something went wrong like a thrown exception while rendering the template

Return values
mixed

supports()

{@inheritdoc}

public supports(mixed $name) : mixed

It also supports Template as name parameter.

Parameters
$name : mixed
Return values
mixed

load()

Loads the given template.

protected load(string|TemplateReferenceInterface|Template $name) : Template
Parameters
$name : string|TemplateReferenceInterface|Template

A template name or an instance of TemplateReferenceInterface or Template

Tags
throws
InvalidArgumentException

if the template does not exist

Return values
Template

Search results