Mercurial > hg > cmmr2012-drupal-site
comparison core/scripts/dump-database-d8-mysql.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
1 #!/usr/bin/env php | |
2 <?php | |
3 | |
4 /** | |
5 * @file | |
6 * A command line application to dump a database to a generation script. | |
7 */ | |
8 | |
9 use Drupal\Core\Command\DbDumpApplication; | |
10 use Drupal\Core\DrupalKernel; | |
11 use Drupal\Core\Site\Settings; | |
12 use Symfony\Component\HttpFoundation\Request; | |
13 | |
14 if (PHP_SAPI !== 'cli') { | |
15 return; | |
16 } | |
17 | |
18 // Bootstrap. | |
19 $autoloader = require __DIR__ . '/../../autoload.php'; | |
20 require_once __DIR__ . '/../includes/bootstrap.inc'; | |
21 $request = Request::createFromGlobals(); | |
22 Settings::initialize(dirname(dirname(__DIR__)), DrupalKernel::findSitePath($request), $autoloader); | |
23 $kernel = DrupalKernel::createFromRequest($request, $autoloader, 'prod')->boot(); | |
24 | |
25 // Run the database dump command. | |
26 $application = new DbDumpApplication(); | |
27 $application->run(); |