SessionNamespace
extends AbstractSession
in package
Session namespace class
Tags
Table of Contents
- $namespace : string
- Session namespace
- __construct() : mixed
- Constructor
- __get() : mixed
- Get method to return the value of the $_SESSION global variable
- __isset() : bool
- Return the isset value of the $_SESSION global variable
- __set() : void
- Set a property in the session object that is linked to the $_SESSION global variable
- __unset() : void
- Unset the $_SESSION global variable
- count() : int
- Method to get the count of data in the session
- getIterator() : ArrayIterator
- Method to iterate over the session
- getNamespace() : string
- Get current namespace
- kill() : void
- Kill the session namespace
- offsetExists() : bool
- ArrayAccess offsetExists
- offsetGet() : mixed
- ArrayAccess offsetGet
- offsetSet() : void
- ArrayAccess offsetSet
- offsetUnset() : void
- ArrayAccess offsetUnset
- setNamespace() : SessionNamespace
- Set current namespace
- setRequestValue() : SessionNamespace
- Set a request-based value
- setTimedValue() : SessionNamespace
- Set a time-based value
- toArray() : array<string|int, mixed>
- Get the session values as an array
- checkExpirations() : void
- Check the time-based session values
- checkRequests() : void
- Check the request-based session values
- init() : void
- Init the session
Properties
$namespace
Session namespace
private
string
$namespace
= null
Methods
__construct()
Constructor
public
__construct(string $namespace) : mixed
Private method to instantiate the session object
Parameters
- $namespace : string
Tags
Return values
mixed —__get()
Get method to return the value of the $_SESSION global variable
public
__get(string $name) : mixed
Parameters
- $name : string
Return values
mixed —__isset()
Return the isset value of the $_SESSION global variable
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
bool —__set()
Set a property in the session object that is linked to the $_SESSION global variable
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
Return values
void —__unset()
Unset the $_SESSION global variable
public
__unset(string $name) : void
Parameters
- $name : string
Return values
void —count()
Method to get the count of data in the session
public
count() : int
Return values
int —getIterator()
Method to iterate over the session
public
getIterator() : ArrayIterator
Return values
ArrayIterator —getNamespace()
Get current namespace
public
getNamespace() : string
Return values
string —kill()
Kill the session namespace
public
kill() : void
Return values
void —offsetExists()
ArrayAccess offsetExists
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
bool —offsetGet()
ArrayAccess offsetGet
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
Return values
mixed —offsetSet()
ArrayAccess offsetSet
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
Return values
void —offsetUnset()
ArrayAccess offsetUnset
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
Return values
void —setNamespace()
Set current namespace
public
setNamespace(string $namespace) : SessionNamespace
Parameters
- $namespace : string
Return values
SessionNamespace —setRequestValue()
Set a request-based value
public
setRequestValue(string $key, mixed $value[, int $hops = 1 ]) : SessionNamespace
Parameters
- $key : string
- $value : mixed
- $hops : int = 1
Return values
SessionNamespace —setTimedValue()
Set a time-based value
public
setTimedValue(string $key, mixed $value[, int $expire = 300 ]) : SessionNamespace
Parameters
- $key : string
- $value : mixed
- $expire : int = 300
Return values
SessionNamespace —toArray()
Get the session values as an array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —checkExpirations()
Check the time-based session values
private
checkExpirations() : void
Return values
void —checkRequests()
Check the request-based session values
private
checkRequests() : void
Return values
void —init()
Init the session
private
init() : void