Class MOXMAN_Storage_JsonStorage

InheritanceMOXMAN_Storage_JsonStorage
ImplementsMOXMAN_Storage_IStorage

This class enables plugins to store key/value properties globally, on a specific group or on the current user.

Public Methods

Hide inherited methods

MethodDescriptionDefined 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

get() public method

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.

getAll() public method

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.

initialize() public method

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.

put() public method

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.

remove() public method

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.