mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-17 14:51:37 +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;
|
||||
}
|
||||
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
return call_user_func_array(array($this->twig, $name), $arguments);
|
||||
}
|
||||
|
||||
public function getRenderedTemplates()
|
||||
{
|
||||
return $this->renderedTemplates;
|
||||
|
@@ -30,6 +30,11 @@ class TraceableTwigTemplate implements Twig_TemplateInterface
|
||||
$this->template = $template;
|
||||
}
|
||||
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
return call_user_func_array(array($this->template, $name), $arguments);
|
||||
}
|
||||
|
||||
public function getTemplateName()
|
||||
{
|
||||
return $this->template->getTemplateName();
|
||||
|
Reference in New Issue
Block a user