Class MOXMAN_Storage_JsonStorage
| Inheritance | MOXMAN_Storage_JsonStorage |
|---|---|
| Implements | MOXMAN_Storage_IStorage |
This class enables plugins to store key/value properties globally, on a specific group or on the current user.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| get() | Returns a specific property by name. | MOXMAN_Storage_JsonStorage |
| getAll() | Returns a name/value array of all the properties in the storage. | MOXMAN_Storage_JsonStorage |
| initialize() | Initializes the storage instance. | MOXMAN_Storage_JsonStorage |
| put() | Puts the specified property by name into storage. | MOXMAN_Storage_JsonStorage |
| remove() | Removes the specified property by name. | MOXMAN_Storage_JsonStorage |
Method Details
Returns a specific property by name.
| public \Property get ( $name, $default = null ) | ||
| $name | string | Name of the property to retrive. |
| $default | string | Default value to return if the property didn't exist. |
| return | \Property | Value or default value depending on if the property existed or not. |
|---|---|---|
Returns a name/value array of all the properties in the storage.
| public Array getAll ( ) | ||
| return | Array | Name/value array of all the properties in the storage. |
|---|---|---|
Initializes the storage instance.
| public void initialize ( $config, $type, $name ) | ||
| $config | MOXMAN_Util_Config | Config instance. |
| $type | int | Storage type to use, can be any of the type constants. |
| $name | string | Name of the user/group if those types are used or an empty string. |
Puts the specified property by name into storage.
| public \Storage put ( $name, $value ) | ||
| $name | string | Name of the property to store. |
| $value | string | Value of the property to store. |
| return | \Storage | Instance so you can chain put calls. |
|---|---|---|
Removes the specified property by name.
| public \Storage remove ( $name ) | ||
| $name | string | Name of the property to remove. |
| return | \Storage | Instance so you can chain put calls. |
|---|---|---|