\Thelia\CommandInstall

Command.

Summary

Methods
Properties
Constants
setContainer()
No public properties found
No constants found
configure()
execute()
checkPermission()
createConfigFile()
insertSql()
prepareSql()
createDatabase()
tryConnection()
getConnectionInfo()
decorateInfo()
getContainer()
No protected properties found
N/A
No private methods found
$container
N/A

Properties

$container

$container : \Symfony\Component\DependencyInjection\ContainerInterface

Type

\Symfony\Component\DependencyInjection\ContainerInterface

Methods

setContainer()

setContainer(\Symfony\Component\DependencyInjection\ContainerInterface $container)

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container

configure()

configure()

Configure the command

execute()

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

Parameters

\Symfony\Component\Console\Input\InputInterface $input
\Symfony\Component\Console\Output\OutputInterface $output

checkPermission()

checkPermission(\Symfony\Component\Console\Output\OutputInterface $output)

Test if needed directories have write permission

Parameters

\Symfony\Component\Console\Output\OutputInterface $output

createConfigFile()

createConfigFile(array $connectionInfo)

rename database config file and complete it

Parameters

array $connectionInfo

insertSql()

insertSql(\PDO $connection, mixed $dbName)

Insert all sql needed in database

Parameters

\PDO $connection
mixed $dbName

prepareSql()

prepareSql(mixed $sql) : array

Separate each sql instruction in an array

Parameters

mixed $sql

Returns

array

createDatabase()

createDatabase(\PDO $connection, mixed $dbName)

create database if not exists

Parameters

\PDO $connection
mixed $dbName

tryConnection()

tryConnection(mixed $connectionInfo, \Symfony\Component\Console\Output\OutputInterface $output) : bool|\PDO

test database access

Parameters

mixed $connectionInfo
\Symfony\Component\Console\Output\OutputInterface $output

Returns

bool|\PDO

getConnectionInfo()

getConnectionInfo(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : array

Ask to user all needed information

Parameters

\Symfony\Component\Console\Input\InputInterface $input
\Symfony\Component\Console\Output\OutputInterface $output

Returns

array

decorateInfo()

decorateInfo( $text)

Parameters

$text

getContainer()

getContainer() : \Symfony\Component\DependencyInjection\ContainerInterface

Returns

\Symfony\Component\DependencyInjection\ContainerInterface