Class \Scrivo\Session

The Scrivo Session class is a lightweight container for session variables.

It should enable you to create a section in to session variable space to store a set of session variables and to enable you to destroy the complete set at once.

userId = 32; header("Location: script2.php"); ?> userId; ?>

Defined in: Session.php.


Constructor summary

Attr. Name / Description
public

Session($section)

Construct a session, either using the default session name: "Scrivo" or using your own name.

Member summary

Attr. Type Name Description
private string $section The name of the section.

Method summary

Attr. Type Name / Description
public mixed

__get($name)

Property access to a session variable.

public

__isset($name)

Check if a session variable was set.

public

__set($name, $value)

Implementation of the writable properties using the PHP magic method __set().

public

__unset($name)

Unset/delete a session variable.

public

destroy()

Destroy the session and all its variables.

 


Constructor

public Session(string $section=null)

Construct a session, either using the default session name: "Scrivo" or using your own name.

Parameters:

Type Name Def. Description
string $section null

Members


				
private string $section

The name of the section.

Inital value: "Scrivo"


Methods

public mixed __get(string $name)

Property access to a session variable.

Parameters:

Type Name Def. Description
string $name

The session variable name.

Returns:

mixed Property access to a session variable.

Throws:

Exception Type Description
\Scrivo\SystemException if the variable does not exists.
public __isset(string $name)

Check if a session variable was set.

Parameters:

Type Name Def. Description
string $name

The session variable name.

public __set(string $name, mixed $value)

Implementation of the writable properties using the PHP magic method __set().

Parameters:

Type Name Def. Description
string $name

The name of the property to set.

mixed $value

The value of the property to set.

public __unset(string $name)

Unset/delete a session variable.

Parameters:

Type Name Def. Description
string $name

The session variable name.

public destroy()

Destroy the session and all its variables.


Documentation generated by phpDocumentor 2.0.0a12 and ScrivoDocumentor on August 29, 2013