예제 #1
0
파일: View.php 프로젝트: brienomatty/elmsln
 /**
  * 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();
 }