LimeSurvey API - Master branch

DbStorage
in package
implements iPluginStorage

Table of Contents

Interfaces

iPluginStorage

Methods

__construct()  : mixed
NB: Needed even if empty.
get()  : mixed
Returns plugin data.
set()  : bool
Stores plugin data.
getGeneric()  : mixed
setGeneric()  : bool

Methods

__construct()

NB: Needed even if empty.

public __construct() : mixed

get()

Returns plugin data.

public get(iPlugin $plugin[, string $key = null ][, string $model = null ][, int $id = null ][, mixed $default = null ][, string $language = null ]) : mixed
Parameters
$plugin : iPlugin
$key : string = null

Key for the setting; passing null will return all keys.

$model : string = null

Optional model name to which the data was attached.

$id : int = null

Optional id of the model instance to which the data was attached.

$default : mixed = null

Default value to return if key could not be found.

$language : string = null

Optional language identifier used for retrieving the setting.

Return values
mixed

Returns the value from the database or null if not set.

set()

Stores plugin data.

public set(iPlugin $plugin, string $key, mixed $data[, string $model = null ][, int $id = null ][, string $language = null ]) : bool
Parameters
$plugin : iPlugin
$key : string
$data : mixed

The data to be stored, serialized using serialize.

$model : string = null

Optional model name to which the data was attached.

$id : int = null

Optional id of the model instance to which the data was attached.

$language : string = null

Optional language identifier used for storing the setting.

Return values
bool

getGeneric()

protected getGeneric(iPlugin $plugin, string $key, string $model, int $id, mixed $default) : mixed
Parameters
$plugin : iPlugin
$key : string
$model : string

Optional model name to which the data was attached.

$id : int

Optional id of the model instance to which the data was attached.

$default : mixed

Default value to return if key could not be found.

Return values
mixed

Returns the value from the database or null if not set.

setGeneric()

protected setGeneric(iPlugin $plugin, string $key, mixed $data, string $model, int $id, string $language) : bool
Parameters
$plugin : iPlugin
$key : string
$data : mixed
$model : string

Optional model name to which the data was attached.

$id : int

Optional id of the model instance to which the data was attached.

$language : string

Optional language identifier used for storing the setting.

Return values
bool

        
On this page

Search results