Twig_Environment::enableAutoReload PHP Метод

enableAutoReload() публичный Метод

Enables the auto_reload option.
public enableAutoReload ( )
    public function enableAutoReload()
    {
        $this->autoReload = true;
    }

Usage Example

 /**
  * 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();
 }
All Usage Examples Of Twig_Environment::enableAutoReload