-
Notifications
You must be signed in to change notification settings - Fork 34
classes_essentials_session_objectstore.class
ObjectStore class is used to store objects without blowing up the PHP session. When objects are serialized into the $_SESSION variable, PHP startup time increases dramatically once a fair number of objects is reached. To avoid this we use a special ObjectStore. In fact, we implemented different stores for different scenarios, all inherited from this base class.
Subclasses: APCStore, DbStore, FilesStore, RedisStore, SessionStore
INTERNAL Cleans things up
INTERNAL Creates a unique object ID
Removes an object from the store.
Definition: public abstract function Delete($id)
Returns: void
Parameters:
-
string $idThe object ID
Checks, if an object is stored.
Definition: public abstract function Exists($id)
Returns: bool true or false
Parameters:
-
string $idThe object ID
INTERNAL Used for performance testing
Changes the session ID.
Definition: public abstract function Migrate($old_session_id, $new_session_id)
Returns: void
Parameters:
-
string $old_session_idThe old session ID -
string $new_session_idThe new session ID
Loads an object from the store.
Definition: public abstract function Restore($id)
Returns: mixed The object or false
Parameters:
-
string $idThe object ID
Stores an object.
Definition: public abstract function Store($obj, $id)
Returns: void
Parameters:
-
mixed $objObject to be stored -
string $idOptional id
Updates used objects.
Definition: public abstract function Update($keep_alive=false)
Returns: void
Parameters:
-
bool $keep_aliveIf true, updates the 'used' timestamps too