-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
TemplateReferenceInterface.php
72 lines (64 loc) · 1.62 KB
/
TemplateReferenceInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Templating;
/**
* Interface to be implemented by all templates.
*
* @author Victor Berchet <victor@suumit.com>
*/
interface TemplateReferenceInterface
{
/**
* Gets the template parameters.
*
* @return array An array of parameters
*/
public function all();
/**
* Sets a template parameter.
*
* @return $this
*
* @throws \InvalidArgumentException if the parameter name is not supported
*/
public function set(string $name, string $value);
/**
* Gets a template parameter.
*
* @return string The parameter value
*
* @throws \InvalidArgumentException if the parameter name is not supported
*/
public function get(string $name);
/**
* Returns the path to the template.
*
* By default, it just returns the template name.
*
* @return string A path to the template or a resource
*/
public function getPath();
/**
* Returns the "logical" template name.
*
* The template name acts as a unique identifier for the template.
*
* @return string The template name
*/
public function getLogicalName();
/**
* Returns the string representation as shortcut for getLogicalName().
*
* Alias of getLogicalName().
*
* @return string The template name
*/
public function __toString();
}