You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the $this->templatePath at $ this->getTemplatePath(), etc.
For example:
public function __construct($templatePath, array $attributes = [])
{
$this->setTemplatePath($templatePath);
$this->setAttributes($attributes);
}
It is necessary to inherit PhpRenderer class, now it is pointless to have to rewrite all
Remove \InvalidArgumentException("Duplicate template key found") in the fetch() method. Correct protectedIncludeScope:
protected function protectedIncludeScope($template, array $data) {
extract($data, EXTR_SKIP); // fix
include $template;
}
PhpRenderer Inherit from class \ArrayObject and remove features that use the $attributes.
(It also uses an interface \ ArrayAccess, https://github.com/slimphp/Twig-View/)
Например:
Это очень важно для наследования класса, сейчас это бессмысленно, все равно все переписывать
The text was updated successfully, but these errors were encountered: