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.
Attr. | Name / Description |
---|---|
public |
Session($section) Construct a session, either using the default session name: "Scrivo" or using your own name. |
Attr. | Type | Name | Description |
---|---|---|---|
private | string | $section | The name of the section. |
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 View source: Session.php line 71.
Members
- private string $section
-
The name of the section.
Inital value: "Scrivo"
View source: Session.php line 63.
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. View source: Session.php line 98.
- public __isset(string $name)
-
Check if a session variable was set.
Parameters:
Type Name Def. Description string $name The session variable name.
View source: Session.php line 110.
- 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.
View source: Session.php line 87.
- public __unset(string $name)
-
Unset/delete a session variable.
Parameters:
Type Name Def. Description string $name The session variable name.
View source: Session.php line 119.
- public destroy()
-
Destroy the session and all its variables.
View source: Session.php line 126.
Documentation generated by phpDocumentor 2.0.0a12 and ScrivoDocumentor on August 29, 2013