Example #1
0
<?php

/**
 * This file is part of Contao.
 *
 * Copyright (c) 2005-2015 Leo Feyer
 *
 * @license LGPL-3.0+
 */
use Contao\Config;
use Contao\InstallationBundle\ClassLoader\LibraryLoader;
use Contao\InstallationBundle\Controller\InstallationController;
use Contao\InstallationBundle\DependencyInjection\ContainerFactory;
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_USER_DEPRECATED);
$loader = (require_once __DIR__ . '/../vendor/autoload.php');
require_once __DIR__ . '/../app/AppKernel.php';
require_once __DIR__ . '/../vendor/contao/core-bundle/src/Resources/contao/helper/functions.php';
$kernel = new AppKernel('prod', false);
// Register the class loader
$libraryLoader = new LibraryLoader($kernel->getRootDir());
$libraryLoader->register();
Config::preload();
// Create the container
$container = ContainerFactory::create($kernel->getRootDir());
// Run the controller
$controller = new InstallationController();
$controller->setContainer($container);
$response = $controller->indexAction();
$response->send();
Example #2
0
 /**
  * Boots the helper system.
  */
 private function bootHelperSystem()
 {
     $contaoDir = $this->getRootDir() . '/../vendor/contao/core-bundle';
     require_once $contaoDir . '/src/Resources/contao/config/constants.php';
     require_once $contaoDir . '/src/Resources/contao/helper/functions.php';
     // Register the class loader
     $libraryLoader = new LibraryLoader($this->getRootDir());
     $libraryLoader->register();
     Config::preload();
     // Create the container
     $this->container = ContainerFactory::create($this);
     System::setContainer($this->container);
     ClassLoader::scanAndRegister();
 }
Example #3
0
 * Copyright (c) 2005-2015 Leo Feyer
 *
 * @license LGPL-3.0+
 */
use Contao\ClassLoader;
use Contao\Config;
use Contao\InstallationBundle\ClassLoader\LibraryLoader;
use Contao\InstallationBundle\Controller\InstallationController;
use Contao\InstallationBundle\DependencyInjection\ContainerFactory;
use Contao\System;
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_USER_DEPRECATED);
$loader = (require_once __DIR__ . '/../vendor/autoload.php');
require_once __DIR__ . '/../app/AppKernel.php';
require_once __DIR__ . '/../vendor/contao/core-bundle/src/Resources/contao/config/constants.php';
require_once __DIR__ . '/../vendor/contao/core-bundle/src/Resources/contao/helper/functions.php';
$kernel = new AppKernel('prod', false);
// Un-normalize the path (see #208)
$rootDir = strtr($kernel->getRootDir(), '/', DIRECTORY_SEPARATOR);
// Register the class loader
$libraryLoader = new LibraryLoader($rootDir);
$libraryLoader->register();
Config::preload();
// Create the container
$container = ContainerFactory::create($rootDir);
System::setContainer($container);
ClassLoader::scanAndRegister();
// Run the controller
$controller = new InstallationController();
$controller->setContainer($container);
$response = $controller->indexAction();
$response->send();