1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-19 15:51:24 +02:00

Merge pull request #177 from getgrav/twig-macro-support

Using __call() for missing methods. Twig macro fix.
This commit is contained in:
Barry vd. Heuvel
2014-11-11 21:32:23 +01:00
2 changed files with 10 additions and 0 deletions

View File

@@ -43,6 +43,11 @@ class TraceableTwigEnvironment extends Twig_Environment
$this->timeDataCollector = $timeDataCollector; $this->timeDataCollector = $timeDataCollector;
} }
public function __call($name, $arguments)
{
return call_user_func_array(array($this->twig, $name), $arguments);
}
public function getRenderedTemplates() public function getRenderedTemplates()
{ {
return $this->renderedTemplates; return $this->renderedTemplates;

View File

@@ -30,6 +30,11 @@ class TraceableTwigTemplate implements Twig_TemplateInterface
$this->template = $template; $this->template = $template;
} }
public function __call($name, $arguments)
{
return call_user_func_array(array($this->template, $name), $arguments);
}
public function getTemplateName() public function getTemplateName()
{ {
return $this->template->getTemplateName(); return $this->template->getTemplateName();