# \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

File
  Command/Install.php
Package
  \Default
Class hierarchy
  \Symfony\Component\Console\Command\Command
  \Thelia\Command\ContainerAwareCommand
  \Thelia\Command\Install

## Tags

None found

## Properties

### $container

    $container : \Symfony\Component\DependencyInjection\ContainerInterface

#### Type

\Symfony\Component\DependencyInjection\ContainerInterface

#

Inherited from
  \Thelia\Command\ContainerAwareCommand

## Tags

None found

## Methods

### setContainer()

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

#### Parameters

\Symfony\Component\DependencyInjection\ContainerInterface | $container |

#

Inherited from
  \Thelia\Command\ContainerAwareCommand
See also

## Tags

None found

### configure()

    configure()

Configure the command

#

## Tags

None found

### 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 |

#

## Tags

None found

### checkPermission()

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

Test if needed directories have write permission

#### Parameters

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

#

## Tags

None found

### createConfigFile()

    createConfigFile(array $connectionInfo)

rename database config file and complete it

#### Parameters

array | $connectionInfo |

#

## Tags

None found

### insertSql()

    insertSql(\PDO $connection, mixed $dbName)

Insert all sql needed in database

#### Parameters

\PDO | $connection |
mixed | $dbName |

#

## Tags

None found

### prepareSql()

    prepareSql(mixed $sql) : array

Separate each sql instruction in an array

#### Parameters

mixed | $sql |

#### Returns

array

#

## Tags

None found

### createDatabase()

    createDatabase(\PDO $connection, mixed $dbName)

create database if not exists

#### Parameters

\PDO | $connection |
mixed | $dbName |

#

## Tags

None found

### 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

#

## Tags

None found

### 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

#

## Tags

None found

### decorateInfo()

    decorateInfo( $text)

#### Parameters

| $text |

#

## Tags

None found

### getContainer()

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

#### Returns

\Symfony\Component\DependencyInjection\ContainerInterface

#

Inherited from
  \Thelia\Command\ContainerAwareCommand

## Tags

None found

### Install.php