Class AkDbSession

(line 56)

Description

AkObject
   |
   --AkDbSession

Located in File: /AkDbSession.php

Database based session.

This class enables saving sessions into a database. This can be usefull for multiple server sites, and to have more control over sessions.

  1.  require_once(AK_LIB_DIR.'/AkDbSession.php');
  2.  
  3.  $AkDbSession = new AkDbSession();
  4.  $AkDbSession->sessionLife = AK_SESSION_EXPIRE;
  5.  array(&$AkDbSession'_open'),
  6.  array(&$AkDbSession'_close'),
  7.  array(&$AkDbSession'_read'),
  8.  array(&$AkDbSession'_write'),
  9.  array(&$AkDbSession'_destroy'),
  10.  array(&$AkDbSession'_gc')
  11.  );



Class Variables

Summary:
integer $sessionLife
object $_db

$sessionLife = AK_SESSION_EXPIRE (line 65)

Data type : integer

Secconds for the session to expire.

$_db (line 75)

Data type : object

Database instance handler

Stores a reference to an ADODB database instance.

  • access: - protected

Class Constants

Summary:

Method Detail

Summary:
bool setSessionLife (integer $sessionLife)
boolean _close ()
boolean _destroy (string $id)
boolean _gc ()
boolean _open ()
string _read (string $id)
boolean _write (string $id, string $data)

Method setSessionLife (line 96)

bool setSessionLife( integer $sessionLife)

$this->sessionLife setter

Use this method to set $this->sessionLife value

Parameters

  • integer $sessionLife: Secconds for the session to expire.

Info

  • return - Returns true if $this->sessionLife has been set correctly.
  • see - get$sessionLife
  • access - public

Method _close (line 122)

boolean _close( )

Session close handler

Info

  • access - protected

Method _destroy (line 178)

boolean _destroy( string $id)

Session destroy handler

Parameters

  • string $id:

Info

  • access - protected

Method _gc (line 189)

boolean _gc( )

Session garbage collection handler

Info

  • access - protected

Method _open (line 110)

boolean _open( )

Session open handler

Info

  • access - protected

Method _read (line 139)

string _read( string $id)

Session read handler

Parameters

  • string $id: Session Id

Info

  • access - protected

Method _write (line 153)

boolean _write( string $id, string $data)

Session write handler

Parameters

  • string $id:
  • string $data:

Info

  • access - protected

Inherited Variables

Inherited Class Variable Summary

Inherited Methods

Inherited Method Summary

Inherited From Class AkObject

AkObject::AkObject() - A hack to support __construct() on PHP 4

AkObject::__construct() - Class constructor, overriden in descendant classes

AkObject::freeMemory() - Unsets circular reference children that are not freed from memory when calling unset() or when the parent object is garbage collected.

AkObject::log() -

AkObject::toString() - Object-to-string conversion

AkObject::__clone() - Clone class (Zend Engine 2 compatibility trick)

AkObject::__destruct() - Class destructor, overriden in descendant classes

AkObject::__toString() -



Documentation generated on Tue, 17 Jun 2008 14:25:07 +0200 by phpDocumentor 1.3.2