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

Class: HTTP_Session2_Container_Memcache

Source Location: /HTTP_Session2-0.7.2/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@

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

Class Details

[line 35]
Memcache container for session data


[ Top ]


Method Detail

__construct (Constructor)   [line 58]

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 113]

boolean close( )

Free resources
  • Access: public

[ Top ]

connect   [line 71]

boolean connect( object $mc)

Connect by using the given DSN string
  • Throws: HTTP_Session2_Exception
  • Access: protected

Parameters:

object   $mc   —  Memcache object

[ Top ]

destroy   [line 155]

boolean destroy( string $id)

Destroy session data
  • Access: public

Parameters:

string   $id   —  Session id

[ Top ]

gc   [line 168]

boolean gc( int $maxlifetime)

Garbage collection
  • Access: public

Parameters:

int   $maxlifetime   —  Maximum lifetime

[ Top ]

open   [line 103]

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 125]

mixed read( string $id)

Read session data
  • Access: public

Parameters:

string   $id   —  Session id

[ Top ]

replicate   [line 182]

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 89]

void setDefaults( )

Set some default options
  • Access: protected

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

write   [line 138]

boolean write( string $id, mixed $data)

Write session data
  • Access: public

Parameters:

string   $id   —  Session id
mixed   $data   —  Session data

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:19:19 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.