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

Class: HTTP_Session2_Container_DB

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

Class Overview

HTTP_Session2_Container
   |
   --HTTP_Session2_Container_DB

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

__construct (Constructor)   [line 93]

void __construct( array $options)

Constrtuctor 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

Overrides HTTP_Session2_Container::__construct() (Constrtuctor method)

Parameters:

array   $options   —  The options

[ Top ]

close   [line 160]

void close( )

Free resources
  • Access: public

[ Top ]

destroy   [line 238]

void destroy( $id)

Destroy session data
  • Access: public

Parameters:

   $id   — 

[ Top ]

gc   [line 257]

void gc( $maxlifetime)

Garbage collection
  • Access: public

Parameters:

   $maxlifetime   — 

[ Top ]

open   [line 147]

void open( $save_path, $session_name)

Establish connection to a database
  • Access: public

Parameters:

   $save_path   — 
   $session_name   — 

[ Top ]

read   [line 169]

void read( $id)

Read session data
  • Access: public

Parameters:

   $id   — 

[ Top ]

write   [line 185]

void write( $id, $data)

Write session data
  • Access: public

Parameters:

   $id   — 
   $data   — 

[ Top ]


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