|
CORE POS - IS4C
The CORE POS front end
|
Public Member Functions | |
| LocalStorage () | |
| get ($key) | |
| set ($key, $val, $immutable=false) | |
| isImmutable ($key) | |
| current () | |
| key () | |
| next () | |
| valid () | |
| rewind () | |
| iteratorKeys () | |
Protected Member Functions | |
| immutableSet ($key, $val) | |
| debug () | |
Protected Attributes | |
| $immutables = array() | |
| $iterator_position = 0 | |
| $iterator_keys = array() | |
A module for storing persistent values This is handled via PHP sessions by default.
Interface class. Must be subclassed to do anything.
| LocalStorage::current | ( | ) |
Iterator interface methods
|
protected |
Log state changes if debugging is enabled
Call this from your set method
| LocalStorage::get | ( | $key) |
Get the value stored with the given key
| $key | A unique key string |
The value can be any PHP type that the underlying mechanism can store.
If the key is not found, the return value will be an empty string.
|
protected |
Store an immutable value by key
| $key | A unique key string |
| $val | The value (mixed) |
Values are saved in LocalStorage::immutables
| LocalStorage::isImmutable | ( | $key) |
Check if a key is present in immutables
| $key | A unique key string |
| LocalStorage::iteratorKeys | ( | ) |
Iterator interface helper for child classes
| LocalStorage::LocalStorage | ( | ) |
Constructor
| LocalStorage::set | ( | $key, | |
| $val, | |||
$immutable = false |
|||
| ) |
Save the value with the given key
| $key | A unique key string |
| $val | The value (mixed) |
| $immutable | the value is a constant |
The value can be any PHP type that the underlying mechanism can store.
1.8.4