Properties

$instance

$instance : object

Instance of the session

Type

object

$sessionId

$sessionId : string

Session ID

Type

string

Methods

kill()

kill() : void

Destroy the 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

count()

count() : integer

Method to get the count of data in the session

Returns

integer

getIterator()

getIterator() : \ArrayIterator

Method to iterate over the session

Returns

\ArrayIterator

toArray()

toArray() : array

Get the session values as an array

Returns

array

__get()

__get(string  $name) : mixed

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

Parameters

string $name

Returns

mixed

__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

__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

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

getId()

getId() : string

Return the current the session id

Returns

string

regenerateId()

regenerateId(boolean  $deleteOldSession = true) : void

Regenerate the session id

Parameters

boolean $deleteOldSession

__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