\Hazaar
Session
Session class

Sessions make use of the Hazaar\Cache class but they create a unique session ID so stored data is not shared between user sessions. If you want to store data that can be shared then use the Hazaar\Cache classes directly.

Tags

Since

2.0.1

Summary
Methods Properties Constants
get
has
set
No constants
Properties
Static
$SESSION_NAME
$SESSION_NAME
Static
$session_id
$session_id
Methods
__construct()
__construct($options = Array ( ) , $backend = null)

Parameters

$options

No description

$backend

No description

Inherited
__destruct()
__destruct()
Inherited
__get()
__get($key)

Parameters

$key

No description

Inherited
__isset()
__isset($key)

Parameters

$key

No description

Inherited
__set()
__set($key, $value)

Parameters

$key

No description

$value

No description

Inherited
__unset()
__unset($key)

Parameters

$key

No description

Inherited
clear()
clear()
Inherited
configure()
configure($options)

Parameters

$options

No description

Inherited
extend()
extend($array, $recursive = false)

Parameters

$array

No description

$recursive

No description

Inherited
get()
get($key, $default = false, $save_default = false) : mixed
Retrieve a value from cache storage.

Parameters

$keymixed

The reference key used to store the value.

$default\Hazaar\bool

If the value doesn’t exist, this default will be returned instead.

$save_default\Hazaar\bool

If the value doesn’t exist and a default is specified, save that default to cache.

Returns

mixed

The value that was stored in cache.

Inherited
has()
has($key) : boolean
Check if a stored value exists.

Parameters

$keymixed

The value key to check for.

Returns

boolean

Returns TRUE or FALSE indicating if the value is stored.

Inherited
offsetExists()
offsetExists($offset)

Parameters

$offset

No description

Inherited
offsetGet()
offsetGet($offset)

Parameters

$offset

No description

Inherited
offsetSet()
offsetSet($offset, $value)

Parameters

$offset

No description

$value

No description

Inherited
offsetUnset()
offsetUnset($offset)

Parameters

$offset

No description

Inherited
pull()
pull($key)

Parameters

$key

No description

Inherited
remove()
remove($key) : boolean
Removes a stored value

Parameters

$keymixed

The key of the value to remove

Returns

boolean

tRUE indicates the value existed and was removed. FALSE otherwise.

Inherited
set()
set($key, $value, $timeout = null) : boolean
Store a value in the cache using the current cache backend.

Parameters

$keymixed

The reference key under which to store the value.

$valuemixed

The value that should be stored. Values can be pretty much anything including integers, booleans, strings and any object that can be serialised.

$timeoutmixed

The number of seconds after which the value becomes invalid. If not set the global ‘lifetime’ option is used. Set a value of ‘-1’ to indicate that the value should never timeout.

Returns

boolean

Boolean indicating whether or not the operation succeeded.

Inherited
setValues()
setValues($values)

Parameters

$values

No description

Inherited
toArray()
toArray()