コード例 #1
0
<?php

/*
 * This file is part of Contao.
 *
 * Copyright (c) 2005-2016 Leo Feyer
 *
 * @license LGPL-3.0+
 */
use Contao\InstallationBundle\HttpKernel\InstallationKernel;
use Symfony\Component\HttpFoundation\Request;
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_USER_DEPRECATED);
/**
 * @var Composer\Autoload\ClassLoader
 */
$loader = (require __DIR__ . '/../app/autoload.php');
$kernel = new InstallationKernel('dev', false);
$kernel->loadClassCache();
// Handle the request
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
コード例 #2
0
ファイル: install.php プロジェクト: bytehead/contao-4-demo
<?php

/**
 * This file is part of Contao.
 *
 * Copyright (c) 2005-2016 Leo Feyer
 *
 * @license LGPL-3.0+
 */
use Contao\InstallationBundle\Controller\InstallationController;
use Contao\InstallationBundle\HttpKernel\InstallationKernel;
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_USER_DEPRECATED);
$loader = (require_once __DIR__ . '/../app/autoload.php');
require_once __DIR__ . '/../app/AppKernel.php';
$kernel = new InstallationKernel('dev', false);
$kernel->boot();
// Run the controller
$controller = new InstallationController();
$controller->setContainer($kernel->getContainer());
$response = $controller->indexAction();
$response->send();