/** * Step completed * * @param string $step Current step * * @return void */ protected static function completeStep($step) { // "Step completed" indicator \Includes\Utils\FileManager::write(static::getCacheStateIndicatorFileName($step), static::getCacheStateIndicatorFileContent()); // Write classes cache if ($root = static::getClassesTree(false)) { \Includes\Utils\FileManager::write(static::getClassesHashPath(), serialize(array_merge($root->findAll(), array($root)))); } // Remove the "rebuilding cache" indicator file static::checkRebuildIndicatorState(); if (static::isSkipRedirectAfterLastStep($step)) { // Do not redirect after last step // (this mode is used when cache builder was launched from LC standalone installation script) static::displayCompleteMessage(); exit; } elseif (!static::isDoOneStepOnly()) { // Perform redirect (needed for multi-step cache generation) \Includes\Utils\Operator::refresh(); } }