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

Class: HTTP_Session2_Container_MDB

Source Location: /HTTP_Session2-0.1.0/Session2/Container/MDB.php

Class Overview

HTTP_Session2_Container
   |
   --HTTP_Session2_Container_MDB

Database container for session data


Author(s):

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

Class Details

[line 57]
Database container for session data

Create the following table to store session data

  1.  CREATE TABLE `sessiondata` (
  2.      `id` CHAR(32NOT NULL,
  3.      `expiry` INT UNSIGNED NOT NULL DEFAULT 0,
  4.      `data` TEXT NOT NULL,
  5.      PRIMARY KEY (`id`)
  6.  );



[ Top ]


Method Detail

HTTP_Session2_Container_MDB (Constructor)   [line 92]

void HTTP_Session2_Container_MDB( array $options)

Constructor method

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

  • 'dsn' - The DSN string
  • 'table' - Table with session data, default is 'sessiondata'
  • 'autooptimize' - Boolean, 'true' to optimize the table on garbage collection, default is 'false'.

  • Access: public

Parameters:

array   $options   —  The options

[ Top ]

close   [line 164]

void close( )

Free resources

[ Top ]

destroy   [line 246]

void destroy( $id)

Destroy session data

Parameters:

   $id   — 

[ Top ]

gc   [line 265]

void gc( $maxlifetime)

Garbage collection

Parameters:

   $maxlifetime   — 

[ Top ]

open   [line 151]

void open( $save_path, $session_name)

Establish connection to a database

Parameters:

   $save_path   — 
   $session_name   — 

[ Top ]

read   [line 173]

void read( $id)

Read session data

Parameters:

   $id   — 

[ Top ]

write   [line 193]

void write( $id, $data)

Write session data

Parameters:

   $id   — 
   $data   — 

[ Top ]


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