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:
@@ -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;
|
||||||
|
@@ -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();
|
||||||
|
Reference in New Issue
Block a user