mediatekformation

TwigEngine
in package
implements EngineInterface, StreamingEngineInterface

This engine knows how to render 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
StreamingEngineInterface

Table of Contents

$environment  : mixed
$parser  : mixed
__construct()  : mixed
exists()  : mixed
{@inheritdoc}
render()  : mixed
{@inheritdoc}
stream()  : mixed
{@inheritdoc}
supports()  : mixed
{@inheritdoc}
load()  : Template
Loads the given template.

Properties

Methods

__construct()

public __construct(Environment $environment, TemplateNameParserInterface $parser) : mixed
Parameters
$environment : Environment
$parser : TemplateNameParserInterface
Return values
mixed

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

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