-
Notifications
You must be signed in to change notification settings - Fork 34
classes_essentials_session_sessionbase.class
Base class for SessionHandlers. Implements basic functionalities and defines some more as abstract which must be implemented by inherited classes.
Subclasses: DbSession, PhpSession
Creates a object id
ScavixWDF will create IDs for Renderable objects automatically and ensures uniqueness for
the whole session. This method creates such an id based on the given objects classname.
It will store it to $obj->_storage_id and return it.
Definition: public function CreateId($obj)
Returns: string The generated object id
Parameters:
-
object $objObject which needs an id
Removes an object from the object store.
Definition: public abstract function Delete($id)
Returns: void
Parameters:
-
string $idKey of the object to remove
Checks if an object exists in the object store.
Definition: public abstract function Exists($id)
Returns: bool true or false
Parameters:
-
string $idKey of the object to check for
Generates a secure session id See http://www.php-security.org/2010/05/09/mops-submission-04-generating-unpredictable-session-ids-and-hashes/index.html#more-204
Definition: public function GenerateSessionId($maxLength)
Returns: string Session id
Parameters:
-
int $maxLengthMaximum length of resulting id
Perform a session keep alive.
Definition: public abstract function KeepAlive($request_key)
Returns: void
Parameters:
-
string $request_keyKey in the REQUEST variable containing the request_id value
Clears the complete object store.
Definition: public abstract function KillAll()
Returns: void
Regenerates the session id See http://www.php.net/manual/en/function.session-regenerate-id.php
Definition: public function RegenerateId($destroy_old_session=false)
Returns: bool true or false
Parameters:
-
bool $destroy_old_sessionWhether to delete the old associated session file or not
Returns a (new) request id ScavixWDF creates a new ID for every request and passed it to every subsequent AJAX call. This method does the real magic and creates a new request id or returns the current.
Definition: public function RequestId()
Returns: string A new request id or the current one
Restores an object from the object store.
Definition: public abstract function Restore($id)
Returns: object The restored object
Parameters:
-
string $idKey of the object to restore
Implement to perform sanitations like checking if users IP has changed.
Definition: public abstract function Sanitize()
Returns: void
Store an object into the object store.
Definition: public abstract function Store($obj, $id)
Returns: void
Parameters:
-
object $objObject to be stored -
string $idKey to store object under (use create_storage_id if not given)
Ensures object validity Calls store_object for every Renderable object in the object store to ensure that the stored objects really match the serialized ones. This is needed because fields/properties can change after the initial save and our caching will hide that from system.
No need to call this manually, ScavixWDF will do!
Definition: public function Update()
Returns: void