Convert DrupalKernel into simply a DrupalApp class, since all of the kernel-y stuff is happening in HttpKernel anyway.
parent
87e5aede35
commit
fdbc8a2404
|
@ -25,9 +25,9 @@ use Exception;
|
|||
/**
|
||||
* The DrupalKernel is the main routing and dispatching routine in Drupal.
|
||||
*/
|
||||
class DrupalKernel implements HttpKernelInterface {
|
||||
class DrupalApp {
|
||||
|
||||
function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true) {
|
||||
function execute(Request $request) {
|
||||
try {
|
||||
|
||||
$dispatcher = new EventDispatcher();
|
||||
|
@ -48,9 +48,6 @@ class DrupalKernel implements HttpKernelInterface {
|
|||
$event->setResponse(new Response('Not Found', 404));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
use Drupal\Core\DrupalKernel;
|
||||
use Drupal\Core\DrupalApp;
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
@ -26,9 +26,9 @@ drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
|
|||
|
||||
// A request object from the HTTPFoundation to tell us about the request.
|
||||
$request = Request::createFromGlobals();
|
||||
// Run our kernel, get a response, and send it.
|
||||
$kernel = new DrupalKernel();
|
||||
$kernel->handle($request)->send();
|
||||
|
||||
$kernel = new DrupalApp();
|
||||
$kernel->execute($request)->send();
|
||||
|
||||
//$response = router_execute_request($request);
|
||||
// Output response.
|
||||
|
|
Loading…
Reference in New Issue