index.php 1.03 KB
Newer Older
Dries's avatar
 
Dries committed
1
<?php
Dries's avatar
Dries committed
2

3
use Drupal\Core\DrupalKernel;
4
use Symfony\Component\HttpFoundation\Request;
5 6 7
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpKernel\Controller\ControllerResolver;

8

Dries's avatar
 
Dries committed
9 10 11 12 13 14
/**
 * @file
 * The PHP page that serves all page requests on a Drupal installation.
 *
 * The routines here dispatch control to the appropriate handler, which then
 * prints the appropriate page.
15 16
 *
 * All Drupal code is released under the GNU General Public License.
17
 * See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
Dries's avatar
 
Dries committed
18 19
 */

20 21 22
/**
 * Root directory of Drupal installation.
 */
23
define('DRUPAL_ROOT', getcwd());
24

neclimdul's avatar
WIP  
neclimdul committed
25
// Bootstrap the lowest level of what we need.
26
require_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
27
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
neclimdul's avatar
WIP  
neclimdul committed
28 29 30

// A request object from the HTTPFoundation to tell us about the request.
$request = Request::createFromGlobals();
31

32 33 34 35 36

$dispatcher = new EventDispatcher();
$resolver = new ControllerResolver();

$kernel = new DrupalKernel($dispatcher, $resolver);
37
$kernel->handle($request)->send();