Contao\CoreBundle\Command\InstallCommand::addInitializePhp PHP Méthode

addInitializePhp() private méthode

Adds the initialize.php file.
private addInitializePhp ( )
    private function addInitializePhp()
    {
        $this->fs->dumpFile($this->rootDir . '/system/initialize.php', <<<'EOF'
<?php

use Contao\CoreBundle\Response\InitializeControllerResponse;
use Symfony\Component\HttpFoundation\Request;

if (!defined('TL_SCRIPT')) {
    die('Your script is not compatible with Contao 4.');
}

/**
 * @var Composer\Autoload\ClassLoader
 */
$loader = require __DIR__ . '/../app/autoload.php';
include_once __DIR__ . '/../app/bootstrap.php.cache';

$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();

$response = $kernel->handle(Request::create('/_contao/initialize', 'GET', [], [], [], $_SERVER));

// Send the response if not generated by the InitializeController
if (!($response instanceof InitializeControllerResponse)) {
    $response->send();
    $kernel->terminate($request, $response);
    exit;
}

EOF
);
        $this->io->text("Added/updated the <comment>system/initialize.php</comment> file.\n");
    }