You are here

class DbDumpApplication in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Command/DbDumpApplication.php \Drupal\Core\Command\DbDumpApplication

Provides a command to dump a database generation script.

Hierarchy

Expanded class hierarchy of DbDumpApplication

2 files declare their use of DbDumpApplication
DbDumpTest.php in core/modules/system/src/Tests/Update/DbDumpTest.php
Contains \Drupal\system\Tests\Update\DbDumpTest.
dump-database-d8-mysql.php in core/scripts/dump-database-d8-mysql.php

File

core/lib/Drupal/Core/Command/DbDumpApplication.php, line 16
Contains \Drupal\Core\Command\DbDumpApplication.

Namespace

Drupal\Core\Command
View 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

Namesort descending Modifiers Type Description Overrides
Application::$autoExit private property
Application::$catchExceptions private property
Application::$commands private property
Application::$defaultCommand private property
Application::$definition private property
Application::$dispatcher private property
Application::$helperSet private property
Application::$name private property
Application::$runningCommand private property
Application::$terminalDimensions private property
Application::$version private property
Application::$wantHelps private property
Application::add public function Adds a command object.
Application::addCommands public function Adds an array of command objects.
Application::all public function Gets the commands (registered in the given namespace if provided).
Application::asText Deprecated public function Returns a text representation of the Application.
Application::asXml Deprecated public function Returns an XML representation of the Application.
Application::configureIO protected function Configures the input and output instances based on the user arguments and options.
Application::doRun public function Runs the current application.
Application::doRunCommand protected function Runs the current command.
Application::extractAllNamespaces private function Returns all namespaces of the command name.
Application::extractNamespace public function Returns the namespace part of the command name.
Application::find public function Finds a command by name or alias.
Application::findAlternatives private function Finds alternative of $name among $collection, if nothing is found in $collection, try in $abbrevs.
Application::findNamespace public function Finds a registered namespace by a name or an abbreviation.
Application::get public function Returns a registered command by name or alias.
Application::getAbbreviations public static function Returns an array of possible abbreviations given a set of names.
Application::getAbbreviationSuggestions private function Returns abbreviated suggestions in string format.
Application::getConsoleMode private function Runs and parses mode CON if it's available, suppressing any error output.
Application::getDefaultHelperSet protected function Gets the default helper set with the helpers that should always be available. 1
Application::getDefaultInputDefinition protected function Gets the default input definition. 1
Application::getHelp public function Gets the help message.
Application::getHelperSet public function Get the helper set associated with the command.
Application::getLongVersion public function Returns the long version of the application.
Application::getName public function Gets the name of the application.
Application::getNamespaces public function Returns an array of all unique namespaces used by currently registered commands.
Application::getSttyColumns private function Runs and parses stty -a if it's available, suppressing any error output.
Application::getTerminalDimensions public function Tries to figure out the terminal dimensions based on the current environment.
Application::getTerminalHeight protected function Tries to figure out the terminal height in which this application runs.
Application::getTerminalWidth protected function Tries to figure out the terminal width in which this application runs.
Application::getVersion public function Gets the application version.
Application::has public function Returns true if the command exists, false otherwise.
Application::register public function Registers a new command.
Application::renderException public function Renders a caught exception.
Application::run public function Runs the current application.
Application::setAutoExit public function Sets whether to automatically exit after a command execution or not.
Application::setCatchExceptions public function Sets whether to catch exceptions or not during commands execution.
Application::setDefaultCommand public function Sets the default Command name.
Application::setDefinition public function Set an input definition set to be used with this application.
Application::setDispatcher public function
Application::setHelperSet public function Set a helper set to be used with the command.
Application::setName public function Sets the application name.
Application::setTerminalDimensions public function Sets terminal dimensions.
Application::setVersion public function Sets the application version.
Application::splitStringByWidth private function
Application::stringWidth private function
Application::__construct public function Constructor. 4
DbDumpApplication::getCommandName protected function Gets the name of the command based on input. Overrides Application::getCommandName
DbDumpApplication::getDefaultCommands protected function Gets the default commands that should always be available. Overrides Application::getDefaultCommands
DbDumpApplication::getDefinition public function Overridden so the application doesn't expect the command name as the first argument. Overrides Application::getDefinition