Util/SessionHandler.php
- Classes
- Kwf_Util_SessionHandler
\Kwf_Util_SessionHandler
- see
- http://pureform.wordpress.com/2009/04/08/memcache-mysql-php-session-handler/
- Properties
- $_lifeTime
- $_refreshTime
- Methods
- close
- destroy
- gc
- init
- open
- read
- write
Description
Memcache & MySQL PHP Session Handler
original author Jakub Matějka jakub@keboola.com
Properties
$_lifeTime
int $_lifeTime = ''
Details
- int
- visibility
- protected
- default
- final
- false
- static
- false
$_refreshTime
int $_refreshTime = ''
interval for session expiration update in the DB
Details
- int
- visibility
- protected
- default
- final
- false
- static
- false
Methods
close
close(
)
:
bool
closing the session
Output
- bool
Details
- visibility
- public
- final
- false
- static
- false
destroy
destroy(
string $sessionId
)
:
bool
destroy of the session
Arguments
- $sessionId
- string
Output
- bool
Details
- visibility
- public
- final
- false
- static
- false
gc
gc(
int $maxlifetime
)
:
bool
called by the garbage collector
Arguments
- $maxlifetime
- int
Output
- bool
Details
- visibility
- public
- final
- false
- static
- false
init
init(
)
:
Details
- visibility
- public
- final
- false
- static
- true
open
open(
string $savePath, string $sessionName
)
:
bool
opening of the session - mandatory arguments won't be needed
Arguments
- $savePath
- string
- $sessionName
- string
Output
- bool
Details
- visibility
- public
- final
- false
- static
- false
read
read(
string $sessionId
)
:
string
reading of the session data if the data couldn't be found in the Memcache, we try to load it from the DB we have to update the time of data expiration in the db using _updateDbExpiration() the life time in Memcache is updated automatically by write operation
Arguments
- $sessionId
- string
Output
- string
Details
- visibility
- public
- final
- false
- static
- false
write
write(
string $sessionId, string $data
)
:
bool
cache write - this is called when the script is about to finish, or when session_write_close() is called data are written only when something has changed
Arguments
- $sessionId
- string
- $data
- string
Output
- bool
Details
- visibility
- public
- final
- false
- static
- false