Legend of the Green Dragon

Settings
in package

Table of Contents

$cache  : mixed
$doctrine  : mixed
$repository  : mixed
$settings  : mixed
$settingsKey  : mixed
$tablename  : mixed
__construct()  : mixed
clearSettings()  : mixed
Force to reload all settings.
getAllSettings()  : array<string|int, mixed>
Get all settings of game.
getArray()  : array<string|int, mixed>
Alias of getAllSettings().
getSetting()  : string
Get a value of a setting.
loadSettings()  : void
Load all settings in table.
repository()  : object|null
Get repository.
saveSetting()  : bool
Save setting in to Data Base.
setTableName()  : self
Set a table name for settings.
getCacheKey()  : string
Get key of cache.

Properties

$settings

protected mixed $settings = []

$settingsKey

protected mixed $settingsKey = 'game-settings-'

$tablename

protected mixed $tablename = 'settings'

Methods

__construct()

public __construct(CacheInterface $cache, EntityManagerInterface $doctrine) : mixed
Parameters
$cache : CacheInterface
$doctrine : EntityManagerInterface
Return values
mixed

clearSettings()

Force to reload all settings.

public clearSettings() : mixed
Return values
mixed

getAllSettings()

Get all settings of game.

public getAllSettings() : array<string|int, mixed>
Return values
array<string|int, mixed>

getArray()

Alias of getAllSettings().

public getArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSetting()

Get a value of a setting.

public getSetting(string $settingname[, string|false $default = null ]) : string
Parameters
$settingname : string
$default : string|false = null
Return values
string

loadSettings()

Load all settings in table.

public loadSettings() : void
Return values
void

repository()

Get repository.

public repository() : object|null
Return values
object|null

saveSetting()

Save setting in to Data Base.

public saveSetting(string $settingname, mixed $value) : bool
Parameters
$settingname : string
$value : mixed
Return values
bool

setTableName()

Set a table name for settings.

public setTableName(string $table) : self

This table must have a repository.

Parameters
$table : string
Return values
self

getCacheKey()

Get key of cache.

protected getCacheKey() : string
Return values
string

Search results