Newscoop\Installer\Services\BootstrapService::warmapCache PHP Метод

warmapCache() публичный Метод

Reload themes reditions in datbase
public warmapCache ( )
    public function warmapCache()
    {
        $phpFinder = new PhpExecutableFinder();
        $phpPath = $phpFinder->find();
        if (!$phpPath) {
            throw new \RuntimeException('The php executable could not be found, add it to your PATH environment variable and try again');
        }
        $php = escapeshellarg($phpPath);
        $newscoopConsole = escapeshellarg($this->newscoopDir . '/application/console');
        $command = new Process("{$php} {$newscoopConsole} cache:warmup", null, null, null, 300);
        $command->run();
        if (!$command->isSuccessful()) {
            throw new \RuntimeException($command->getErrorOutput());
        }
    }