class StringLoader implements LoaderInterface (View source)

Loads string templates, also known as inline templates.

This loader is intended to be used in a Twig loader chain and only loads string templates that begin with the following comment:

Methods

exists($name)

{@inheritdoc}

string
getCacheKey(string $name)

{@inheritdoc}

bool
isFresh(string $name, int $time)

{@inheritdoc}

Source
getSourceContext(string $name)

{@inheritdoc}

Details

exists($name)

{@inheritdoc}

Parameters

$name

string getCacheKey(string $name)

{@inheritdoc}

Parameters

string $name

Return Value

string

bool isFresh(string $name, int $time)

{@inheritdoc}

Parameters

string $name
int $time

Return Value

bool

Source getSourceContext(string $name)

{@inheritdoc}

Parameters

string $name

Return Value

Source