PHP Class eZ\Bundle\EzPublishCoreBundle\Command\TestInitDbCommand

Inheritance: extends Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand
Show file Open project: ezsystems/ezpublish-kernel

Public Methods

Method Description
insertData ( string $dbType ) Insert the database data.

Protected Methods

Method Description
applyStatements ( array $statements ) Applies the given SQL $statements to the database in use.
configure ( )
execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
getDatabaseHandler ( ) : ConnectionHandler Returns the database handler from the service container.
getInitialData ( ) : array Returns the initial database data.
getPostInsertStatements ( string $dbType ) : string[] Returns statements to be executed after data insert.
getSchemaStatements ( string $dbType ) : string[] Returns the database schema as an array of SQL statements.

Method Details

applyStatements() protected method

Applies the given SQL $statements to the database in use.
protected applyStatements ( array $statements )
$statements array

configure() protected method

protected configure ( )

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

getDatabaseHandler() protected method

Returns the database handler from the service container.
protected getDatabaseHandler ( ) : ConnectionHandler
return eZ\Publish\Core\Persistence\Doctrine\ConnectionHandler

getInitialData() protected method

Returns the initial database data.
protected getInitialData ( ) : array
return array

getPostInsertStatements() protected method

Returns statements to be executed after data insert.
protected getPostInsertStatements ( string $dbType ) : string[]
$dbType string Name of Database type (mysql, sqlite, pgsql, ..)
return string[]

getSchemaStatements() protected method

Returns the database schema as an array of SQL statements.
protected getSchemaStatements ( string $dbType ) : string[]
$dbType string Name of Database type (mysql, sqlite, pgsql, ..)
return string[]

insertData() public method

Insert the database data.
public insertData ( string $dbType )
$dbType string Name of Database type (mysql, sqlite, pgsql, ..)