2011-02-10 17:20:44 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of the Symfony package.
|
|
|
|
*
|
2011-03-06 11:40:06 +00:00
|
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
2011-02-10 17:20:44 +00:00
|
|
|
*
|
|
|
|
* 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>
|
2011-07-20 09:27:25 +01:00
|
|
|
*
|
|
|
|
* @api
|
2011-02-10 17:20:44 +00:00
|
|
|
*/
|
|
|
|
interface TemplateReferenceInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Gets the template parameters.
|
|
|
|
*
|
|
|
|
* @return array An array of parameters
|
2011-07-20 09:27:25 +01:00
|
|
|
*
|
|
|
|
* @api
|
2011-02-10 17:20:44 +00:00
|
|
|
*/
|
|
|
|
function all();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets a template parameter.
|
|
|
|
*
|
|
|
|
* @param string $name The parameter name
|
|
|
|
* @param string $value The parameter value
|
|
|
|
*
|
|
|
|
* @return TemplateReferenceInterface The TemplateReferenceInterface instance
|
|
|
|
*
|
|
|
|
* @throws \InvalidArgumentException if the parameter is not defined
|
2011-07-20 09:27:25 +01:00
|
|
|
*
|
|
|
|
* @api
|
2011-02-10 17:20:44 +00:00
|
|
|
*/
|
|
|
|
function set($name, $value);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets a template parameter.
|
|
|
|
*
|
|
|
|
* @param string $name The parameter name
|
|
|
|
*
|
|
|
|
* @return string The parameter value
|
|
|
|
*
|
|
|
|
* @throws \InvalidArgumentException if the parameter is not defined
|
2011-07-20 09:27:25 +01:00
|
|
|
*
|
|
|
|
* @api
|
2011-02-10 17:20:44 +00:00
|
|
|
*/
|
|
|
|
function get($name);
|
|
|
|
|
2011-02-21 18:24:27 +00:00
|
|
|
/**
|
|
|
|
* Returns the path to the template.
|
|
|
|
*
|
|
|
|
* By default, it just returns the template name.
|
|
|
|
*
|
|
|
|
* @return string A path to the template or a resource
|
2011-07-20 09:27:25 +01:00
|
|
|
*
|
|
|
|
* @api
|
2011-02-21 18:24:27 +00:00
|
|
|
*/
|
|
|
|
function getPath();
|
2011-04-08 09:31:47 +01:00
|
|
|
|
|
|
|
/**
|
2011-06-07 09:07:43 +01:00
|
|
|
* Returns the "logical" template name.
|
|
|
|
*
|
|
|
|
* The template name acts as a unique identifier for the template.
|
2011-04-08 09:31:47 +01:00
|
|
|
*
|
|
|
|
* @return string The template name
|
2011-07-20 09:27:25 +01:00
|
|
|
*
|
|
|
|
* @api
|
2011-04-08 09:31:47 +01:00
|
|
|
*/
|
|
|
|
function getLogicalName();
|
2011-02-10 17:20:44 +00:00
|
|
|
}
|