Source of file Template.php
Size: 3,048 Bytes - Last Modified: 2013-07-09T11:29:53+02:00
/home/theseer/Downloads/Symfony/vendor/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle/Configuration/Template.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 | <?php namespace Sensio\Bundle\FrameworkExtraBundle\Configuration; use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference; /* * 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. */ /** * The Template class handles the @Template annotation parts. * * @author Fabien Potencier <fabien@symfony.com> * @Annotation */ class Template extends ConfigurationAnnotation { /** * The template reference. * * @var TemplateReference */ protected $template; /** * The template engine used when a specific template isnt specified * * @var string */ protected $engine = 'twig'; /** * The associative array of template variables. * * @var array */ protected $vars = array(); /** * Should the template be streamed? * * @var Boolean */ protected $streamable = false; /** * Returns the array of templates variables. * * @return array */ public function getVars() { return $this->vars; } /** * @param Boolean $streamable */ public function setIsStreamable($streamable) { $this->streamable = $streamable; } /** * @return Boolean */ public function isStreamable() { return (Boolean) $this->streamable; } /** * Sets the template variables * * @param array $vars The template variables */ public function setVars($vars) { $this->vars = $vars; } /** * Returns the engine used when guessing template names * * @return string */ public function getEngine() { return $this->engine; } /** * Sets the engine used when guessing template names * * @param string */ public function setEngine($engine) { $this->engine = $engine; } /** * Sets the template logic name. * * @param string $template The template logic name */ public function setValue($template) { $this->setTemplate($template); } /** * Returns the template reference. * * @return TemplateReference */ public function getTemplate() { return $this->template; } /** * Sets the template reference. * * @param TemplateReference|string $template The template reference */ public function setTemplate($template) { $this->template = $template; } /** * Returns the annotation alias name. * * @return string * @see ConfigurationInterface */ public function getAliasName() { return 'template'; } /** * Only one template directive is allowed * * @return Boolean * @see ConfigurationInterface */ public function allowArray() { return false; } } |