-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Welcome to the Ext.ux.webstorage.Storage wiki!
-
storage
-
The HTML5 StorageArea to store the values (_localStorage _or sessionStorage).
-
arrayDelimiter
-
A string to separate array items when using _setArray _and getArray
-
namespace
-
A string to concatenate with a key to avoid duplicate keys among apps. This config is used by set and get.
-
textCompactor
-
A boolean value (true) to use the default _TextCompactor _or an object with two functions (_compress _and decompress).
-
get(String key, [Function fn])
-
Returns a string value for the given key. If specified it returns what fn returns.
-
set(String key, Mixed value)
-
Stores the _value _using the key.
-
getJson(String key)
-
Try to return a JSON value for the key. This method uses JSON.parse native function.
-
setJson(String key, Object value)
-
This method stores the data in JSON format using JSON.stringify native function.
-
getArray(String key)
-
Returns an array for the key. This method uses the arrayDelimiter config.
-
setArray(String key, Array value)
-
Stores an array using the arrayDelimiter config to separate values.
-
getBoolean(String key)
-
Returns a boolean value. It will only return if the value is the "true", otherwise it will return false.
-
getNumber(String key)
-
Returns a number value.
-
getKey(String key)
-
Returns the key concatenated with the namespace config if it's defined. If the namespace is undefined, it will return only the key.
-
beforestorage(String key, Mixed value, Ext.ux.webstorage.Storage this, StorageArea storage)
-
This event is fired before setting a value. If the event returns false the value is not stored.
-
afterstorage(String key, Mixed value, Ext.ux.webstorage.Storage this, StorageArea storage)
-
This event is fired after setting a value.
-
storage(StorageEvent event, Ext.ux.webstorage.Storage this)
-
The window's sorage event.
-
compress(String text)
-
Compress the given text storing 2 chars in place of 1.
-
decompress(String text)
-
Decompress the given text. The text must be compressed by the compress function.