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

Class: HTTP_Session_Container

Source Location: /HTTP_Session-0.5.4/Session/Container.php

Class Overview


Container class for storing session data


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 1997-2005 The PHP Group

Methods


Child classes:

HTTP_Session_Container_MDB2
Database container for session data
HTTP_Session_Container_MDB
Database container for session data
HTTP_Session_Container_DB
Database container for session data

Inherited Variables

Inherited Methods


Class Details

[line 45]
Container class for storing session data


[ Top ]


Method Detail

HTTP_Session_Container (Constructor)   [line 63]

void HTTP_Session_Container( [array $options = null])

Constrtuctor method
  • Access: public

Parameters:

array   $options   —  Additional options for the container object

[ Top ]

close   [line 114]

void close( )

This function is called when the page is finished executing and the session handler needs to close things off

Has to be overwritten by each container class

  • Access: public

Overridden in child classes as:

HTTP_Session_Container_MDB2::close()
Free resources
HTTP_Session_Container_MDB::close()
Free resources
HTTP_Session_Container_DB::close()
Free resources

[ Top ]

destroy   [line 163]

boolean destroy( mixed $id)

This function is called when a session is destroyed.

It is responsible for deleting the session and cleaning things up.

Has to be overwritten by each container class

  • Return: Obvious
  • Access: public

Overridden in child classes as:

HTTP_Session_Container_MDB2::destroy()
Destroy session data
HTTP_Session_Container_MDB::destroy()
Destroy session data
HTTP_Session_Container_DB::destroy()
Destroy session data

Parameters:

mixed   $id   —  ID of the session

[ Top ]

gc   [line 195]

boolean gc( integer $maxlifetime)

This function is responsible for garbage collection.

In the case of session handling, it is responsible for deleting old, stale sessions that are hanging around. The session handler will call this every now and then.

Has to be overwritten by each container class

  • Return: Obvious
  • Access: public

Overridden in child classes as:

HTTP_Session_Container_MDB2::gc()
Garbage collection
HTTP_Session_Container_MDB::gc()
Garbage collection
HTTP_Session_Container_DB::gc()
Garbage collection

Parameters:

integer   $maxlifetime   —  ???

[ Top ]

open   [line 101]

void open( $save_path, $session_name)

This function is called by the session handler to initialize things
  • Access: public

Overridden in child classes as:

HTTP_Session_Container_MDB2::open()
Establish connection to a database
HTTP_Session_Container_MDB::open()
Establish connection to a database
HTTP_Session_Container_DB::open()
Establish connection to a database

Parameters:

   $save_path   — 
   $session_name   — 

[ Top ]

read   [line 131]

mixed read( mixed $id)

This function is called by the session handler to read the data associated with a given session ID.

This function must retrieve and return the session data for the session identified by $id.

Has to be overwritten by each container class

  • Return: The data associated with a given session ID
  • Access: public

Overridden in child classes as:

HTTP_Session_Container_MDB2::read()
Read session data
HTTP_Session_Container_MDB::read()
Read session data
HTTP_Session_Container_DB::read()
Read session data

Parameters:

mixed   $id   —  ID of the session

[ Top ]

replicate   [line 178]

boolean replicate( mixed $targetTable, [mixed $id = null])

This function copies session data of specified id to specified table

Has to be overwritten by each container class

  • Return: Obvious
  • Access: public

Parameters:

mixed   $targetTable   —  Table to replicate data to
mixed   $id   —  ID of the session

[ Top ]

set   [line 206]

void set( )

Set session save handler
  • Access: public

[ Top ]

write   [line 148]

boolean write( mixed $id, mixed $data)

This function is called when the session handler has session data to save, which usually happens at the end of your script

Has to be overwritten by each container class

  • Return: Obvious
  • Access: public

Overridden in child classes as:

HTTP_Session_Container_MDB2::write()
Write session data
HTTP_Session_Container_MDB::write()
Write session data
HTTP_Session_Container_DB::write()
Write session data

Parameters:

mixed   $id   —  ID of the session
mixed   $data   —  The data associated with a given session ID

[ Top ]


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