\Pop\SessionSession

Session class

Summary

Methods
Properties
Constants
getInstance()
setTimedValue()
setRequestValue()
getId()
regenerateId()
kill()
__set()
__get()
__isset()
__unset()
offsetSet()
offsetGet()
offsetExists()
offsetUnset()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__construct()
init()
checkRequests()
checkExpirations()
$instance
$sessionId
N/A

Properties

$instance

$instance : object

Instance of the session

Type

object

$sessionId

$sessionId : string

Session ID

Type

string

Methods

getInstance()

getInstance() : \Pop\Session\Session

Determine whether or not an instance of the session object exists already, and instantiate the object if it does not exist.

Returns

\Pop\Session\Session

setTimedValue()

setTimedValue(string  $key, mixed  $value, integer  $expire = 300) : \Pop\Session\Session

Set a time-based value

Parameters

string $key
mixed $value
integer $expire

Returns

\Pop\Session\Session

setRequestValue()

setRequestValue(string  $key, mixed  $value, integer  $hops = 1) : \Pop\Session\Session

Set a request-based value

Parameters

string $key
mixed $value
integer $hops

Returns

\Pop\Session\Session

getId()

getId() : string

Return the current the session id

Returns

string

regenerateId()

regenerateId() : void

Regenerate the session id

kill()

kill() : void

Destroy the session

__set()

__set(string  $name, mixed  $value) : void

Set a property in the session object that is linked to the $_SESSION global variable

Parameters

string $name
mixed $value

Throws

\Pop\Session\Exception

__get()

__get(string  $name) : mixed

Get method to return the value of the $_SESSION global variable

Parameters

string $name

Returns

mixed

__isset()

__isset(string  $name) : boolean

Return the isset value of the $_SESSION global variable

Parameters

string $name

Returns

boolean

__unset()

__unset(string  $name) : void

Unset the $_SESSION global variable

Parameters

string $name

Throws

\Pop\Session\Exception

offsetSet()

offsetSet(mixed  $offset, mixed  $value) : void

ArrayAccess offsetSet

Parameters

mixed $offset
mixed $value

Throws

\Pop\Session\Exception

offsetGet()

offsetGet(mixed  $offset) : mixed

ArrayAccess offsetGet

Parameters

mixed $offset

Returns

mixed

offsetExists()

offsetExists(mixed  $offset) : boolean

ArrayAccess offsetExists

Parameters

mixed $offset

Returns

boolean

offsetUnset()

offsetUnset(mixed  $offset) : void

ArrayAccess offsetUnset

Parameters

mixed $offset

Throws

\Pop\Session\Exception

__construct()

__construct() 

Constructor

Private method to instantiate the session object

init()

init() : void

Init the session

checkRequests()

checkRequests() : void

Check the request-based session values

checkExpirations()

checkExpirations() : void

Check the time-based session values