class DbDumpApplication in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Command/DbDumpApplication.php \Drupal\Core\Command\DbDumpApplication
- 10 core/lib/Drupal/Core/Command/DbDumpApplication.php \Drupal\Core\Command\DbDumpApplication
Provides a command to dump a database generation script.
Hierarchy
- class \Drupal\Core\Command\DbDumpApplication extends \Symfony\Component\Console\Application
Expanded class hierarchy of DbDumpApplication
2 files declare their use of DbDumpApplication
- DbDumpTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Command/ DbDumpTest.php - dump-database-d8-mysql.php in core/
scripts/ dump-database-d8-mysql.php - A command line application to dump a database to a generation script.
File
- core/
lib/ Drupal/ Core/ Command/ DbDumpApplication.php, line 11
Namespace
Drupal\Core\CommandView source
class DbDumpApplication extends Application {
/**
* {@inheritdoc}
*/
protected function getCommandName(InputInterface $input) {
return 'dump-database-d8-mysql';
}
/**
* {@inheritdoc}
*/
protected function getDefaultCommands() {
// Even though this is a single command, keep the HelpCommand (--help).
$default_commands = parent::getDefaultCommands();
$default_commands[] = new DbDumpCommand();
return $default_commands;
}
/**
* {@inheritdoc}
*
* Overridden so the application doesn't expect the command name as the first
* argument.
*/
public function getDefinition() {
$definition = parent::getDefinition();
// Clears the normal first argument (the command name).
$definition
->setArguments();
return $definition;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DbDumpApplication:: |
protected | function | ||
DbDumpApplication:: |
protected | function | ||
DbDumpApplication:: |
public | function | Overridden so the application doesn't expect the command name as the first argument. |