TemplateReferenceInterface (Component\Templating)
Symfony\Component\Templating\TemplateReferenceInterface
interface TemplateReferenceInterface
Interface to be implemented by all templates.
Methods
array | all() Gets the template parameters. | |
TemplateReferenceInterface | set(string $name, string $value) Sets a template parameter. | |
string | get(string $name) Gets a template parameter. | |
string | getPath() Returns the path to the template. | |
string | getLogicalName() Returns the "logical" template name. | |
string | __toString() Returns the string representation as shortcut for getLogicalName(). |
Details
public array all()
Gets the template parameters.
public TemplateReferenceInterface set(string $name, string $value)
Sets a template parameter.
public string get(string $name)
Gets a template parameter.
public string getPath()
Returns the path to the template.
By default, it just returns the template name.
public string getLogicalName()
Returns the "logical" template name.
The template name acts as a unique identifier for the template.
public string __toString()
Returns the string representation as shortcut for getLogicalName().
Alias of getLogicalName().
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Templating/TemplateReferenceInterface.html