class DbImportCommand extends DbCommandBase (View source)

Provides a command to import the current database from a script.

This script runs on databases exported using one of the database dump commands and imports it into the current database connection.

Methods

configure()

{@inheritdoc}

getDatabaseConnection(InputInterface $input)

Parse input options decide on a database.

execute(InputInterface $input, OutputInterface $output)

{@inheritdoc}

runScript(Connection $connection, string $script)

Run the database script.

Details

protected configure()

{@inheritdoc}

protected Connection getDatabaseConnection(InputInterface $input)

Parse input options decide on a database.

Parameters

InputInterface $input

Input object.

Return Value

Connection

protected execute(InputInterface $input, OutputInterface $output)

{@inheritdoc}

Parameters

InputInterface $input
OutputInterface $output

protected runScript(Connection $connection, string $script)

Run the database script.

Parameters

Connection $connection

Connection used by the script when included.

string $script

Path to dump script.