/** * 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(); }
/** * Run handler for the current step * * :NOTE: method is public since it's called from * \Includes\Utils\Operator::executeWithCustomMaxExecTime() * * @return void */ public static function executeStepHandler1() { // Invoke plugins \Includes\Decorator\Utils\PluginManager::invokeHook(static::HOOK_BEFORE_CLEANUP); // Delete cache folders static::showStepMessage('Cleaning up the cache...'); static::cleanupCache(); static::showStepInfo(); // Load classes from "classes" (do not use cache) \Includes\Autoloader::switchLcAutoloadDir(); // Main procedure: build decorator chains static::showStepMessage('Building classes tree...'); static::getClassesTree(); static::showStepInfo(); // Invoke plugins \Includes\Decorator\Utils\PluginManager::invokeHook(static::HOOK_STEP_FIRST); }