Menu

## Configuration
in package

Configuration.php : 17

The configuration information for a LotGD game. Configuration is read from a YAML file, who's path is specified when you construct the object.

### Table of Contents

$databaseAutoSchemaUpdate : bool
$databaseDSN : string
$databaseName : string
$databasePassword : string
$databaseUser : string
$gameDaysPerDay : int
$gameEpoch : DateTime
$gameOffsetSeconds : int
$logPath : string
__construct() : mixed
  Create the configuration object, reading from the specified path.
__toString() : string
  Generate a textual representation of the configuration, for debugging purposes.
getDatabaseAutoSchemaUpdate() : bool
  True if doctrine should not auto update.
getDatabaseConnectionDetails() : array<string|int, mixed>
  Returns database connection details needed for pdo to establish a connection.
getDatabaseDSN() : string
  Return the data source name, a way to describe where the database is. See https://en.wikipedia.org/wiki/Data_source_name.
getDatabaseName() : string
  Return the database name.
getDatabasePassword() : string
  Return the database password.
getDatabaseUser() : string
  Return the database user.
getGameDaysPerDay() : int
  Return how many game days should exist inside one real time day.
getGameEpoch() : DateTime
  Return which day, in real time, the game's date should start.
getGameOffsetSeconds() : int
  Return the offset, in seconds, from the game epoch, to define when the game should start.
getLogPath() : string
  Return the path to the directory to store log files.
retrieveRawConfig() : array<string|int, mixed>
  Retrieves raw config via Yaml::parse from a given file.

### Properties

#### $databaseAutoSchemaUpdate

Configuration.php : 23
`private bool $databaseAutoSchemaUpdate`

#### $databaseDSN

Configuration.php : 19
`private string $databaseDSN`

#### $databaseName

Configuration.php : 20
`private string $databaseName`

#### $databasePassword

Configuration.php : 22
`private string $databasePassword`

#### $databaseUser

Configuration.php : 21
`private string $databaseUser`

#### $gameDaysPerDay

Configuration.php : 27
`private int $gameDaysPerDay`

#### $gameEpoch

Configuration.php : 25
`private DateTime $gameEpoch`

#### $gameOffsetSeconds

Configuration.php : 26
`private int $gameOffsetSeconds`

#### $logPath

Configuration.php : 24
`private string $logPath`

### Methods

#### __construct()

Configuration.php : 34

Create the configuration object, reading from the specified path.

`public __construct(string $configFilePath) : mixed`

##### Parameters

$configFilePath : string

  Path to a configuration YAML, relative to the current working directory.

##### Return values

mixed —

#### __toString()

Configuration.php : 218

Generate a textual representation of the configuration, for debugging purposes.

`public __toString() : string`

##### Return values

string —

#### getDatabaseAutoSchemaUpdate()

Configuration.php : 171

True if doctrine should not auto update.

`public getDatabaseAutoSchemaUpdate() : bool`

##### Return values

bool —

#### getDatabaseConnectionDetails()

Configuration.php : 121

Returns database connection details needed for pdo to establish a connection.

`public getDatabaseConnectionDetails([string $cwd = "" ]) : array<string|int, mixed>`

This function takes optionally replaces the string %cwd% in the database dsn and replaces it with the first parameter. This is important to normalize the database location across different working directories. Alternatively, SQLite databse names can also directly be given as an absolute path instead of a relative one.

##### Parameters

$cwd : string = ""

  Current working directory

##### Return values

array<string|int, mixed> —

A list containing the following details: dsn, user, password.

#### getDatabaseDSN()

Configuration.php : 135

Return the data source name, a way to describe where the database is. See https://en.wikipedia.org/wiki/Data_source_name.

`public getDatabaseDSN() : string`

##### Return values

string —

The configured data source name.

#### getDatabaseName()

Configuration.php : 144

Return the database name.

`public getDatabaseName() : string`

##### Return values

string —

The configured database name.

#### getDatabasePassword()

Configuration.php : 162

Return the database password.

`public getDatabasePassword() : string`

##### Return values

string —

The configured database password.

#### getDatabaseUser()

Configuration.php : 153

Return the database user.

`public getDatabaseUser() : string`

##### Return values

string —

The configured database user.

#### getGameDaysPerDay()

Configuration.php : 208

Return how many game days should exist inside one real time day.

`public getGameDaysPerDay() : int`

##### Return values

int —

#### getGameEpoch()

Configuration.php : 189

Return which day, in real time, the game's date should start.

`public getGameEpoch() : DateTime`

##### Return values

DateTime —

#### getGameOffsetSeconds()

Configuration.php : 199

Return the offset, in seconds, from the game epoch, to define when the game should start.

`public getGameOffsetSeconds() : int`

##### Return values

int —

#### getLogPath()

Configuration.php : 180

Return the path to the directory to store log files.

`public getLogPath() : string`

##### Return values

string —

The configured log directory path.

#### retrieveRawConfig()

Configuration.php : 106

Retrieves raw config via Yaml::parse from a given file.

`protected retrieveRawConfig(string $configFilePath) : array<string|int, mixed>`

##### Parameters

$configFilePath : string

  File used to parse with Yaml

##### Return values

array<string|int, mixed> —

Raw config

## Search results