class TemplateReference extends TemplateReference

Internal representation of a template.

Properties

protected $parameters from TemplateReference

Methods

__construct($bundle = null, $controller = null, $name = null, $format = null, $engine = null)

No description

string
__toString()

Returns the string representation as shortcut for getLogicalName().

$this
set(string $name, string $value)

Sets a template parameter.

string
get(string $name)

Gets a template parameter.

array
all()

Gets the template parameters.

string
getPath()

Returns the path to the template - as a path when the template is not part of a bundle - as a resource when the template is part of a bundle.

string
getLogicalName()

Returns the "logical" template name.

Details

at line 23
__construct($bundle = null, $controller = null, $name = null, $format = null, $engine = null)

Parameters

$bundle
$controller
$name
$format
$engine

in TemplateReference at line 34
string __toString()

Returns the string representation as shortcut for getLogicalName().

Alias of getLogicalName().

Return Value

string The template name

in TemplateReference at line 42
$this set(string $name, string $value)

Sets a template parameter.

Parameters

string $name The parameter name
string $value The parameter value

Return Value

$this

Exceptions

InvalidArgumentException if the parameter name is not supported

in TemplateReference at line 56
string get(string $name)

Gets a template parameter.

Parameters

string $name The parameter name

Return Value

string The parameter value

Exceptions

InvalidArgumentException if the parameter name is not supported

in TemplateReference at line 68
array all()

Gets the template parameters.

Return Value

array An array of parameters

at line 41
string getPath()

Returns the path to the template - as a path when the template is not part of a bundle - as a resource when the template is part of a bundle.

Return Value

string A path to the template or a resource

at line 53
string getLogicalName()

Returns the "logical" template name.

The template name acts as a unique identifier for the template.

Return Value

string The template name