for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace allejo\stakx\Templating;
class TwigError extends \Exception implements TemplateErrorInterface
{
private $error;
private $content;
private $relativeFilePath;
private $name;
public function __construct(\Twig_Error $error)
$this->error = $error;
}
/**
* {@inheritdoc}
*/
public function getTemplateLine()
return $this->error->getTemplateLine();
public function setTemplateLine($lineNumber)
$this->error->setTemplateLine($lineNumber);
return $this;
public function setContent($content)
$this->content = $content;
public function setName($name)
$this->name = $name;
public function setRelativeFilePath($filePath)
$this->relativeFilePath = $filePath;
public function buildException()
$this->error->setSourceContext(new \Twig_Source(
$this->content,
$this->name,
$this->relativeFilePath
));