PHP Class CI_Session_files_driver, TastyIgniter

Inheritance: extends CI_Session_driver, implements SessionHandlerInterface
Show file Open project: tastyigniter/tastyigniter Class Usage Examples

Protected Properties

Property Type Description
$_file_handle resource File handle
$_file_new boolean File new flag
$_file_path resource File name
$_save_path string Save path

Public Methods

Method Description
__construct ( array &$params ) : void Class constructor
close ( ) : boolean Close
destroy ( string $session_id ) : boolean Destroy
gc ( integer $maxlifetime ) : boolean Garbage Collector
open ( string $save_path, string $name ) : boolean Open
read ( string $session_id ) : string Read
write ( string $session_id, string $session_data ) : boolean Write

Method Details

__construct() public method

Class constructor
public __construct ( array &$params ) : void
$params array Configuration parameters
return void

close() public method

Releases locks and closes file descriptor.
public close ( ) : boolean
return boolean

destroy() public method

Destroys the current session.
public destroy ( string $session_id ) : boolean
$session_id string Session ID
return boolean

gc() public method

Deletes expired sessions
public gc ( integer $maxlifetime ) : boolean
$maxlifetime integer Maximum lifetime of sessions
return boolean

open() public method

Sanitizes the save_path directory.
public open ( string $save_path, string $name ) : boolean
$save_path string Path to session files' directory
$name string Session cookie name
return boolean

read() public method

Reads session data and acquires a lock
public read ( string $session_id ) : string
$session_id string Session ID
return string Serialized session data

write() public method

Writes (create / update) session data
public write ( string $session_id, string $session_data ) : boolean
$session_id string Session ID
$session_data string Serialized session data
return boolean

Property Details

$_file_handle protected property

File handle
protected resource $_file_handle
return resource

$_file_new protected property

File new flag
protected bool $_file_new
return boolean

$_file_path protected property

File name
protected resource $_file_path
return resource

$_save_path protected property

Save path
protected string $_save_path
return string