\Anax\SessionCSession

Anax base class for wrapping sessions.

Summary

Methods
Properties
Constants
configure()
__construct()
name()
start()
get()
set()
has()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$config
N/A

Properties

$config

$config : 

Properties

Type

Methods

configure()

configure(\Anax\array/string  $what) : $this

Read configuration from file or array'.

Parameters

\Anax\array/string $what

is an array with key/value config options or a file

 to be included which returns such an array.

Returns

$this —

for chaining.

__construct()

__construct(array  $options = array()) 

Construct session.

Parameters

array $options

to configure options.

name()

name(array  $aName = null) 

Set a session name or use one from config.

Parameters

array $aName

to set as session name, default is null and then use name from config.

start()

start(array  $options = array()) 

Start session.

Parameters

array $options

to configure options.

get()

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

Get values from session.

Parameters

string $key

in session variable.

mixed $default

default value to return when key is not set in session.

Returns

mixed

set()

set(string  $key, mixed  $value) : void

Set values in session.

Parameters

string $key

in session variable.

mixed $value

to set in session.

has()

has(string  $key) : boolean

Check if a value is set in the session.

Parameters

string $key

in session variable.

Returns

boolean —

true if $key is set, else false.