Options
in package
Options Class
Table of Contents
- $instance : Options
- $sessionsModel : Options
- Contains the model
- __construct() : mixed
- Constructor
- deleteOption() : bool
- Delete an option permanently
- getInstance() : Options
- Static function used to istance this class: implements singleton pattern to avoid multiple parsing.
- getOptions() : mixed
- Get the game options, leaving the param $option empty will return all of them
- insertOption() : bool
- Insert a new option into database
- writeOptions() : bool
- Update the option in the database
Properties
$instance
private
static Options
$instance
= null
$sessionsModel
Contains the model
private
Options
$sessionsModel
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —deleteOption()
Delete an option permanently
public
deleteOption(string $option) : bool
Parameters
- $option : string
-
Option
Return values
bool —getInstance()
Static function used to istance this class: implements singleton pattern to avoid multiple parsing.
public
static getInstance() : Options
Return values
Options —getOptions()
Get the game options, leaving the param $option empty will return all of them
public
getOptions([string $option = '' ]) : mixed
Parameters
- $option : string = ''
-
Option
Return values
mixed —insertOption()
Insert a new option into database
public
insertOption(string $option[, string $value = '' ]) : bool
Parameters
- $option : string
-
Option
- $value : string = ''
-
Value
Return values
bool —writeOptions()
Update the option in the database
public
writeOptions(string $option[, string $value = '' ]) : bool
Parameters
- $option : string
-
Option
- $value : string = ''
-
Value