Menu

## Bootstrap
in package

Bootstrap.php : 25

The entry point for constructing a properly configured LotGD Game object.

### Table of Contents

$annotationDirectories : mixed
$game : mixed
$libraryConfigurationManager : LibraryConfigurationManager
$logger : mixed
addDaenerysCommands() : mixed
  Adds Symfony/Console commands to the provided application from configured libraries.
createGame() : Game
  Create a new Game object, with all the necessary configuration.
extendModels() : mixed
  Runs the code to extend models.
getGame() : Game
  Starts the game kernel with the most important classes and returns the object.
connectToDatabase() : PDO
  Connects to a database using pdo.
createComposerManager() : ComposerManager
  Creates and returns an instance of ComposerManager.
createConfiguration() : Configuration
  Returns a configuration object reading from the file located at the path stored in $cwd/config/lotgd.yml.
createEntityManager() : EntityManagerInterface
  Creates the EntityManager using the pdo connection given in it's argument.
createLibraryConfigurationManager() : LibraryConfigurationManager
  Creates a library configuration manager.
createLogger() : LoggerInterface
  Returns a logger instance.
generateAnnotationDirectories() : array<string|int, mixed>
  Is used to get all directories used to generate annotations.

### Properties

#### $annotationDirectories

Bootstrap.php : 31
`private mixed $annotationDirectories = []`

#### $game

Bootstrap.php : 28
`private mixed $game`

#### $libraryConfigurationManager

Bootstrap.php : 30
`private LibraryConfigurationManager $libraryConfigurationManager`

#### $logger

Bootstrap.php : 27
`private mixed $logger`

### Methods

#### addDaenerysCommands()

Bootstrap.php : 206

Adds Symfony/Console commands to the provided application from configured libraries.

`public addDaenerysCommands(Application $application) : mixed`

##### Parameters

$application : Application

##### Return values

mixed —

#### createGame()

Bootstrap.php : 38

Create a new Game object, with all the necessary configuration.

`public static createGame([string|null $cwd = null ]) : Game`

##### Parameters

$cwd : string|null = null

##### Return values

Game —

The newly created Game object.

#### extendModels()

Bootstrap.php : 219

Runs the code to extend models.

`public extendModels() : mixed`

##### Return values

mixed —

#### getGame()

Bootstrap.php : 50

Starts the game kernel with the most important classes and returns the object.

`public getGame(string $cwd) : Game`

##### Parameters

$cwd : string

##### Return values

Game —

#### connectToDatabase()

Bootstrap.php : 102

Connects to a database using pdo.

`protected connectToDatabase(string $dsn, string $user, string $password) : PDO`

##### Parameters

$dsn : string
$user : string
$password : string

##### Return values

PDO —

#### createComposerManager()

Bootstrap.php : 112

Creates and returns an instance of ComposerManager.

`protected createComposerManager(string $cwd) : ComposerManager`

##### Parameters

$cwd : string

##### Return values

ComposerManager —

#### createConfiguration()

Bootstrap.php : 124

Returns a configuration object reading from the file located at the path stored in $cwd/config/lotgd.yml.

`protected createConfiguration(string $cwd) : Configuration`

##### Parameters

$cwd : string

##### Tags

throws
  InvalidConfigurationException

##### Return values

Configuration —

#### createEntityManager()

Bootstrap.php : 159

Creates the EntityManager using the pdo connection given in it's argument.

`protected createEntityManager(PDO $pdo, Configuration $config) : EntityManagerInterface`

##### Parameters

$pdo : PDO
$config : Configuration

##### Return values

EntityManagerInterface —

#### createLibraryConfigurationManager()

Bootstrap.php : 88

Creates a library configuration manager.

`protected createLibraryConfigurationManager(ComposerManager $composerManager, string $cwd) : LibraryConfigurationManager`

##### Parameters

$composerManager : ComposerManager
$cwd : string

##### Return values

LibraryConfigurationManager —

#### createLogger()

Bootstrap.php : 144

Returns a logger instance.

`protected createLogger(Configuration $config, string $name) : LoggerInterface`

##### Parameters

$config : Configuration
$name : string

##### Return values

LoggerInterface —

#### generateAnnotationDirectories()

Bootstrap.php : 191

Is used to get all directories used to generate annotations.

`protected generateAnnotationDirectories() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

## Search results