/**
* Loads the Twig instance and registers the autoloader.
*/
public function configure()
{
parent::configure();
$this->configuration = $this->context->getConfiguration();
// empty array becuase it changes based on the rendering context
$this->loader = new Twig_Loader_Filesystem(array());
$this->twig = new sfTwigEnvironment($this->loader, array('cache' => sfConfig::get('sf_template_cache_dir'), 'debug' => sfConfig::get('sf_debug', false), 'sf_context' => $this->context));
if ($this->twig->isDebug()) {
$this->twig->enableAutoReload();
$this->twig->setCache(null);
}
$this->loadExtensions();
}