示例#1
0
 /**
  * Clear compiled Twig templates
  * @ignore
  */
 public static function clearCompiledTemplates()
 {
     $twig = new Twig();
     $twig->getTwigEnvironment()->clearTemplateCache();
 }
示例#2
0
文件: View.php 项目: diosmosis/piwik
 /**
  * Clear compiled Twig templates
  * @ignore
  */
 public static function clearCompiledTemplates()
 {
     $twig = new Twig();
     $environment = $twig->getTwigEnvironment();
     $environment->clearTemplateCache();
     $cacheDirectory = $environment->getCache();
     if (!empty($cacheDirectory) && is_dir($cacheDirectory)) {
         $environment->clearCacheFiles();
     }
 }
示例#3
0
 private function initializeTwig()
 {
     $piwikTwig = new Twig();
     $this->twig = $piwikTwig->getTwigEnvironment();
 }