W3cubDocs

/Symfony 4.1

TemplateNameParser

class TemplateNameParser extends TemplateNameParser

TemplateNameParser converts template names from the short notation "bundle:section:template.format.engine" to TemplateReferenceInterface instances.

Properties

protected $kernel
protected $cache

Methods

TemplateReferenceInterface parse(string|TemplateReferenceInterface $name)

Convert a template name to a TemplateReferenceInterface instance.

__construct(KernelInterface $kernel)

Details

TemplateReferenceInterface parse(string|TemplateReferenceInterface $name)

Convert a template name to a TemplateReferenceInterface instance.

Parameters

string|TemplateReferenceInterface $name A template name or a TemplateReferenceInterface instance

Return Value

TemplateReferenceInterface A template

__construct(KernelInterface $kernel)

Parameters

KernelInterface $kernel

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Bundle/FrameworkBundle/Templating/TemplateNameParser.html