App Engine PHP SDK  v1 rev.445
The PHP runtime is available as an experimental Preview feature.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
google\appengine\ext\session\MemcacheSessionHandler Class Reference
Inheritance diagram for google\appengine\ext\session\MemcacheSessionHandler:

Public Member Functions

 __construct ($memcacheContainer=null)
 
 open ($savePath, $sessionName)
 
 close ()
 
 read ($id)
 
 write ($id, $data)
 
 destroy ($id)
 
 gc ($maxlifetime)
 

Static Public Member Functions

static configure ($memcacheContainer=null)
 

Public Attributes

const SESSION_PREFIX = '_ah_sess_'
 

Detailed Description

A session handler interface using the GAE Memcache API.

Constructor & Destructor Documentation

google\appengine\ext\session\MemcacheSessionHandler::__construct (   $memcacheContainer = null)

Constructs the session handler instance.

Parameters
MemcacheContainer$memcacheContainerOptional, for mocking in tests

Member Function Documentation

google\appengine\ext\session\MemcacheSessionHandler::close ( )

Closes the session handler.

Returns
bool true if successful, false otherwise
static google\appengine\ext\session\MemcacheSessionHandler::configure (   $memcacheContainer = null)
static

Configure the session handler to use the Memcache API.

Parameters
MemcacheContainer$memcacheContainerOptional, for mocking in tests

Set so that it is clear that Memcache is being used for session handling, as retrieving session.save_handler just returns "user".

google\appengine\ext\session\MemcacheSessionHandler::destroy (   $id)

Destroy the data associated with a particular session ID.

Parameters
string$idSession ID associated with the data to be destroyed
Returns
bool true if successful, false otherwise
google\appengine\ext\session\MemcacheSessionHandler::gc (   $maxlifetime)

Garbage collection method - always returns true as this is handled by the Memcache expire function.

Parameters
int$maxlifetimeNot used
Returns
bool true if successful, false otherwise
google\appengine\ext\session\MemcacheSessionHandler::open (   $savePath,
  $sessionName 
)

Opens the session handler.

Parameters
string$savePathNot used
string$sessionNameNot ued
Returns
bool true if successful, false otherwise
google\appengine\ext\session\MemcacheSessionHandler::read (   $id)

Read an element from Memcache with the given ID.

Parameters
string$idSession ID associated with the data to be retrieved
Returns
string data associated with that ID or bool false on failure
google\appengine\ext\session\MemcacheSessionHandler::write (   $id,
  $data 
)

Write an element to Memcache with the given ID and data.

Parameters
string$idSession ID associated with the data to be stored
string$dataData to be stored
Returns
bool true if successful, false otherwise

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