Ejemplo n.º 1
0
 /**
  * Execute certain hook handler
  *
  * @return void
  */
 public function executeHookHandler()
 {
     // Remove old capsular directories
     if (\Includes\Decorator\Utils\CacheManager::isCapsular()) {
         $currentKey = \Includes\Decorator\Utils\CacheManager::getKey();
         foreach (\Includes\Decorator\Utils\CacheManager::getCacheDirs(true) as $dir) {
             $list = glob(rtrim($dir, LC_DS) . '.*');
             if ($list) {
                 foreach ($list as $subdir) {
                     list($main, $key) = explode('.', $subdir, 2);
                     if ($key && $key != $currentKey) {
                         \Includes\Utils\FileManager::unlinkRecursive($subdir);
                     }
                 }
             }
         }
     }
     \Includes\Decorator\Utils\CacheManager::cleanupCache();
     // Load classes from "classes" (do not use cache)
     \Includes\Autoloader::switchLcAutoloadDir();
     \Includes\Decorator\Plugin\Doctrine\Plugin\QuickData\Main::initializeCounter();
 }