\Pop\WebSession

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\Web\Session

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

Returns

\Pop\Web\Session

setTimedValue()

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

Set a time-based value

Parameters

string $key
mixed $value
integer $expire

Returns

\Pop\Web\Session

setRequestValue()

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

Set a request-based value

Parameters

string $key
mixed $value
integer $hops

Returns

\Pop\Web\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

__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

offsetSet()

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

ArrayAccess offsetSet

Parameters

mixed $offset
mixed $value

Throws

\Pop\Web\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\Web\Exception

__construct()

__construct() : \Pop\Web\Session

Constructor

Private method to instantiate the session object

Returns

\Pop\Web\Session

init()

init() : void

Init the session

checkRequests()

checkRequests() : void

Check the request-based session values

checkExpirations()

checkExpirations() : void

Check the time-based session values