\Omega\Session\Storage AbstractStorage

Abstract storage class.

The AbstractStorage class serves as a base class for session storage implementations. It provides a skeletal implementation of the StorageInterface methods.

Summary

Methods
Properties
Constants
has
get
put
forget
flush
No public properties found
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Methods

has()

has(string  $key) : bool

Check if a session value exists.

Parameters

string $key

The session key.

Returns

bool —

Return true if the session value exists.

get()

get(string  $key, mixed  $default = null) : mixed

Get a session value.

Parameters

string $key

The session key.

mixed $default

The default value to return if the key is not found.

Returns

mixed —

Return the session value or the default value if the key is not found.

put()

put(string  $key, mixed  $value) : $this

Store a value in the session.

Parameters

string $key

The session key.

mixed $value

The session value.

Returns

$this —

forget()

forget(string  $key) : $this

Remove a single session value.

Parameters

string $key

The session key.

Returns

$this —

flush()

flush() : $this

Remove all session values.

Returns

$this —