You are here

class Twig_TemplateTest in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/test/Twig/Tests/TemplateTest.php \Twig_TemplateTest

Hierarchy

Expanded class hierarchy of Twig_TemplateTest

File

vendor/twig/twig/test/Twig/Tests/TemplateTest.php, line 416

View source
class Twig_TemplateTest extends Twig_Template {
  protected $useExtGetAttribute = false;
  public function __construct(Twig_Environment $env, $useExtGetAttribute = false) {
    parent::__construct($env);
    $this->useExtGetAttribute = $useExtGetAttribute;
    self::$cache = array();
  }
  public function getZero() {
    return 0;
  }
  public function getEmpty() {
    return '';
  }
  public function getString() {
    return 'some_string';
  }
  public function getTrue() {
    return true;
  }
  public function getTemplateName() {
  }
  public function getDebugInfo() {
    return array();
  }
  protected function doGetParent(array $context) {
  }
  protected function doDisplay(array $context, array $blocks = array()) {
  }
  public function getAttribute($object, $item, array $arguments = array(), $type = Twig_Template::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false) {
    if ($this->useExtGetAttribute) {
      return twig_template_get_attributes($this, $object, $item, $arguments, $type, $isDefinedTest, $ignoreStrictCheck);
    }
    else {
      return parent::getAttribute($object, $item, $arguments, $type, $isDefinedTest, $ignoreStrictCheck);
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Twig_Template::$blocks protected property
Twig_Template::$cache protected static property
Twig_Template::$env protected property
Twig_Template::$parent protected property
Twig_Template::$parents protected property
Twig_Template::$traits protected property
Twig_Template::display public function Displays the template with the given context. Overrides Twig_TemplateInterface::display
Twig_Template::displayBlock public function Displays a block.
Twig_Template::displayParentBlock public function Displays a parent block.
Twig_Template::displayWithErrorHandling protected function
Twig_Template::getBlockNames public function Returns all block names.
Twig_Template::getBlocks public function Returns all blocks.
Twig_Template::getContext final protected function Returns a variable from the context.
Twig_Template::getEnvironment Deprecated public function Overrides Twig_TemplateInterface::getEnvironment
Twig_Template::getParent public function Returns the parent template.
Twig_Template::getSource public function Returns the template source code.
Twig_Template::hasBlock public function Returns whether a block exists or not.
Twig_Template::isTraitable public function
Twig_Template::loadTemplate protected function
Twig_Template::render public function Renders the template with the given context and returns it as string. Overrides Twig_TemplateInterface::render
Twig_Template::renderBlock public function Renders a block.
Twig_Template::renderParentBlock public function Renders a parent block.
Twig_TemplateInterface::ANY_CALL constant
Twig_TemplateInterface::ARRAY_CALL constant
Twig_TemplateInterface::METHOD_CALL constant
Twig_TemplateTest::$useExtGetAttribute protected property
Twig_TemplateTest::doDisplay protected function Auto-generated method to display the template with the given context. Overrides Twig_Template::doDisplay
Twig_TemplateTest::doGetParent protected function Overrides Twig_Template::doGetParent
Twig_TemplateTest::getAttribute public function Returns the attribute value for a given array/object. Overrides Twig_Template::getAttribute
Twig_TemplateTest::getDebugInfo public function
Twig_TemplateTest::getEmpty public function
Twig_TemplateTest::getString public function
Twig_TemplateTest::getTemplateName public function Returns the template name. Overrides Twig_Template::getTemplateName
Twig_TemplateTest::getTrue public function
Twig_TemplateTest::getZero public function
Twig_TemplateTest::__construct public function Constructor. Overrides Twig_Template::__construct