Interface MOXMAN_Storage_IStorage

Implemented byMOXMAN_Storage_JsonStorage, MOXMAN_Storage_MySqlStorage, MOXMAN_Storage_SqliteStorage

This interface 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_IStorage
getAll() Returns a name/value array of all the properties in the storage. MOXMAN_Storage_IStorage
initialize() Initializes the storage instance. MOXMAN_Storage_IStorage
put() Puts the specified property by name into storage. MOXMAN_Storage_IStorage
remove() Removes the specified property by name. MOXMAN_Storage_IStorage

Method Details

get() public abstract method

Returns a specific property by name.

public abstract \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 abstract method

Returns a name/value array of all the properties in the storage.

public abstract Array getAll ( )
return Array

Name/value array of all the properties in the storage.

initialize() public abstract method

Initializes the storage instance.

public abstract 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 abstract method

Puts the specified property by name into storage.

public abstract \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 abstract method

Removes the specified property by name.

public abstract \Storage remove ( $name )
$name string

Name of the property to remove.

return \Storage

Instance so you can chain put calls.