UpdateKernel example

$autoloader = require_once 'autoload.php';

// Disable garbage collection during test runs. Under certain circumstances the // update path will create so many objects that garbage collection causes // segmentation faults. if (drupal_valid_test_ua()) {
  gc_collect_cycles();
  gc_disable();
}

$kernel = new UpdateKernel('prod', $autoloader, FALSE);
$request = Request::createFromGlobals();

$response = $kernel->handle($request);
$response->send();

$kernel->terminate($request$response);
$autoloader = require_once 'autoload.php';

// Disable garbage collection during test runs. Under certain circumstances the // update path will create so many objects that garbage collection causes // segmentation faults. if (drupal_valid_test_ua()) {
  gc_collect_cycles();
  gc_disable();
}

$kernel = new UpdateKernel('prod', $autoloader, FALSE);
$request = Request::createFromGlobals();

$response = $kernel->handle($request);
$response->send();

$kernel->terminate($request$response);
Home | Imprint | This part of the site doesn't use cookies.