HTTP_Session2
[ class tree: HTTP_Session2 ] [ index: HTTP_Session2 ] [ all elements ]

Class: HTTP_Session2_Container_Memcache

Source Location: /HTTP_Session2-0.7.3/HTTP/Session2/Container/Memcache.php

Class Overview

HTTP_Session2_Container
   |
   --HTTP_Session2_Container_Memcache

Memcache container for session data


Author(s):

Version:

  • Release: @package_version@

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTTP_Session2_Container

HTTP_Session2_Container::__construct()
Constrtuctor method
HTTP_Session2_Container::parseOptions()
Parse options passed to the container class
HTTP_Session2_Container::set()
Set session save handler
HTTP_Session2_Container::setDefaults()
Set some default options
HTTP_Session2_Container::__destruct()
Call session_write_close() in destructor for compatibility with PHP >= 5.0.5

Class Details

[line 38]
Memcache container for session data


[ Top ]


Class Variables

$mc =

[line 45]

Memcache connection object
  • Access: protected

Type:   object Memcache


[ Top ]



Method Detail

__construct (Constructor)   [line 61]

object __construct( array $options)

Constructor method

$options is an array with the options.
The options are:

  • 'memcache' - Memcache object
  • 'prefix' - Key prefix, default is 'sessiondata:'

  • Access: public

Overrides HTTP_Session2_Container::__construct() (Constrtuctor method)

Parameters:

array   $options     Options

[ Top ]

close   [line 115]

boolean close( )

Free resources
  • Access: public

[ Top ]

connect   [line 74]

boolean connect( Memcache $mc)

Connect using the given Memcache object.
  • Throws: HTTP_Session2_Exception
  • Access: protected

Parameters:

Memcache   $mc     A Memcache instance.

[ Top ]

destroy   [line 156]

boolean destroy( string $id)

Destroy session data
  • Access: public

Parameters:

string   $id     Session id

[ Top ]

gc   [line 169]

boolean gc( int $maxlifetime)

Garbage collection
  • Access: public

Parameters:

int   $maxlifetime     Maximum lifetime

[ Top ]

open   [line 105]

boolean open( string $save_path, string $session_name)

Establish connection to a database
  • Access: public

Parameters:

string   $save_path     Save path
string   $session_name     Session name

[ Top ]

read   [line 126]

mixed read( string $id)

Read session data
  • Access: public

Parameters:

string   $id     Session id

[ Top ]

replicate   [line 183]

boolean replicate( string $target, [string $id = null])

Replicate session data to specified target
  • Access: public

Parameters:

string   $target     Target to replicate to
string   $id     Id of record to replicate, if not specified current session id will be used

[ Top ]

setDefaults   [line 91]

void setDefaults( )

Set some default options
  • Access: protected

Overrides HTTP_Session2_Container::setDefaults() (Set some default options)
[ Top ]

write   [line 139]

boolean write( string $id, mixed $data)

Write session data
  • Access: public

Parameters:

string   $id     Session id
mixed   $data     Session data

[ Top ]


Documentation generated on Tue, 22 Jun 2010 18:00:03 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.