This class is used to transport all data a plugin might have stored for a specific user. Stored data may be a number of files, tabular data or urls.
GPL2 or any later version
- Author
- Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m
◆ __construct()
Construct a storage object for a specific user.
- Parameters
-
◆ addData()
Adds stored data. By passing an optional context, the data may be associated with this context.
- Parameters
-
string | $type | Type of data |
mixed | $data | |
SimpleORMap | $context | Optional context |
◆ addFileAtPath()
addFileAtPath |
( |
|
$name, |
|
|
|
$path, |
|
|
SimpleORMap |
$context = null |
|
) |
| |
Adds a local file on disk. By passing an optional context, the data may be associated with this context.
- Parameters
-
◆ addFileRef()
Adds a file reference. By passing an optional context, the data may be associated with this context.
- Parameters
-
◆ addFileWithContents()
addFileWithContents |
( |
|
$name, |
|
|
|
$contents, |
|
|
SimpleORMap |
$context = null |
|
) |
| |
Adds content as a file. By passing an optional context, the data may be associated with this context.
- Parameters
-
string | $name | File name |
string | $contents | File contents (text or binary) |
SimpleORMap | $context | Optional context |
◆ addTabularData()
addTabularData |
( |
|
$name, |
|
|
|
$key, |
|
|
array |
$value, |
|
|
SimpleORMap |
$context = null |
|
) |
| |
Adds tabular data under the specified key. By passing an optional context, the data may be associated with this context.
- Parameters
-
string | $name | Display label |
string | $key | Table name (e.g. database table) |
array | $value | Array containing the rows |
SimpleORMap | $context | Optional context |
◆ getData()
Returns the stored data of the given type for all contexts (if $context is null) or a specific context.
- Parameters
-
string | $type | Type of data |
SimpleORMap | $context | Optional context |
- Returns
- array
◆ getFileData()
Returns the stored file data for all contexts (if $context is null) or a specific context.
- Parameters
-
- Returns
- array
◆ getTabularData()
Returns the stored tabular data for all contexts (if $context is null) or a specific context.
- Parameters
-
- Returns
- array
◆ getUserId()
Returns the associated user.
- Returns
- User object
◆ hasData()
Returns whether this object actually contains any data.
- Returns
- bool
◆ $data
◆ $user_id
The documentation for this class was generated from the following file: