FileAccess Orion

Session
in package
implements SessionHandler

Implement session handler

This class provides interfaces for session handling. It is used to register a redis cache based session save handler.

Class override the local php session handler this class handles all system sessions including garbage collection. It is either a plain file system session or, if possible a apc session.

This handler can either use an cookie based handling like php default and a handler based on oauth tokens.

Tags
category

Kernel

author

Tobias Teichner webmaster@teichner.biz

since

File available since v0.01

Interfaces, Classes, Traits and Enums

SessionHandler
Define a session handler interface with start and end points

Table of Contents

$host  : string|null
__construct()  : mixed
Init session and setup internal properties this will also set the cookie params
close()  : bool
Required method
destroy()  : bool
Destroy session Unset session on logout
End()  : void
GarbageCollect()  : bool
Do garbage collect Empty but required interface for session handler
open()  : bool
Required method to start the session
read()  : mixed|string
Read values
Start()  : void
write()  : bool
Write session

Properties

Methods

__construct()

Init session and setup internal properties this will also set the cookie params

public __construct(string|null $host) : mixed
Parameters
$host : string|null
Return values
mixed

close()

Required method

public close() : bool
Return values
bool

destroy()

Destroy session Unset session on logout

public destroy(string $id) : bool
Parameters
$id : string

The session to delete

Return values
bool

True when delete worked

GarbageCollect()

Do garbage collect Empty but required interface for session handler

public GarbageCollect(int $max_life_time) : bool
Parameters
$max_life_time : int

The maximum session life time

Return values
bool

open()

Required method to start the session

public open( $path,  $name) : bool
Parameters
$path :
$name :
Return values
bool

read()

Read values

public read( $id) : mixed|string
Parameters
$id :
Return values
mixed|string

write()

Write session

public write( $id,  $data) : bool
Parameters
$id :
$data :
Return values
bool

Search results