CORE POS - IS4C
The CORE POS front end
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LocalStorage Class Reference
Inheritance diagram for LocalStorage:
MemcacheStorage SessionStorage SQLiteStorage UnitTestStorage WrappedStorage

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()
 

Detailed Description

A module for storing persistent values This is handled via PHP sessions by default.

Interface class. Must be subclassed to do anything.

Member Function Documentation

LocalStorage::current ( )

Iterator interface methods

LocalStorage::debug ( )
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

Parameters
$keyA unique key string
Returns
The value (mixed)

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.

LocalStorage::immutableSet (   $key,
  $val 
)
protected

Store an immutable value by key

Parameters
$keyA unique key string
$valThe value (mixed)

Values are saved in LocalStorage::immutables

LocalStorage::isImmutable (   $key)

Check if a key is present in immutables

Parameters
$keyA unique key string
Returns
bool
LocalStorage::iteratorKeys ( )

Iterator interface helper for child classes

LocalStorage::LocalStorage ( )

Constructor

LocalStorage::set (   $key,
  $val,
  $immutable = false 
)

Save the value with the given key

Parameters
$keyA unique key string
$valThe value (mixed)
$immutablethe value is a constant

The value can be any PHP type that the underlying mechanism can store.


The documentation for this class was generated from the following file: