Class SessionNamespace (namespace Nette\Web)


Session namespace for Session.

Object
   |
   --SessionNamespace

Implements interfaces:

IteratorAggregate (internal interface), ArrayAccess (internal interface)
Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Web/SessionNamespace.php (line 34)
Public Method Summary
SessionNamespace
__construct (&$data, &$meta)
Do not call directly. Use Session::getNamespace().
ArrayIterator
Returns an iterator over all namespace variables.
bool
offsetExists (string $name)
Determines whether a variable in this session namespace is set.
mixed
offsetGet (string $name)
Gets a variable from this session namespace.
void
offsetSet (string $name, mixed $value)
Sets a variable in this session namespace.
void
offsetUnset (string $name)
Unsets a variable in this session namespace.
void
remove ()
Cancels the current session namespace.
void
removeExpiration ([mixed $variables = NULL])
Removes the expiration from the namespace or specific variables.
void
setExpiration (int $seconds, [mixed $variables = NULL])
Sets the expiration of the namespace or specific variables.
& mixed
__get (string $name)
Gets a variable from this session namespace.
bool
__isset (string $name)
Determines whether a variable in this session namespace is set.
void
__set (string $name, mixed $value)
Sets a variable in this session namespace.
void
__unset (string $name)
Unsets a variable in this session namespace.
Methods Inherited From Object
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Variable Summary
bool $warnOnUndefined FALSE

line 43


Method Details

line 50

__construct

public SessionNamespace __construct (&$data, &$meta)

Do not call directly. Use Session::getNamespace().

Input
&$data
&$meta
Output
SessionNamespace  

line 62

getIterator

public ArrayIterator getIterator ()

Returns an iterator over all namespace variables.

Implementation of:

IteratorAggregate::getIterator
Output
ArrayIterator  

line 163

offsetExists

public bool offsetExists (string $name)

Determines whether a variable in this session namespace is set.

Implementation of:

ArrayAccess::offsetExists
Input
string $name name
Output
bool  

line 150

offsetGet

public mixed offsetGet (string $name)

Gets a variable from this session namespace.

Implementation of:

ArrayAccess::offsetGet
Input
string $name name
Output
mixed  

line 137

offsetSet

public void offsetSet (string $name, mixed $value)

Sets a variable in this session namespace.

Implementation of:

ArrayAccess::offsetSet
Input
string $name name
mixed $value value
Output
void  

line 176

offsetUnset

public void offsetUnset (string $name)

Unsets a variable in this session namespace.

Implementation of:

ArrayAccess::offsetUnset
Input
string $name name
Output
void  

line 242

remove

public void remove ()

Cancels the current session namespace.

Output
void  

line 220

removeExpiration

public void removeExpiration ([mixed $variables = NULL])

Removes the expiration from the namespace or specific variables.

Input
mixed $variables optional list of variables / single variable to expire
Output
void  

line 189

setExpiration

public void setExpiration (int $seconds, [mixed $variables = NULL])

Sets the expiration of the namespace or specific variables.

Input
int $seconds time in seconds, value 0 means "until the browser is closed"
mixed $variables optional list of variables / single variable to expire
Output
void  

line 93

__get

public mixed & __get (string $name)

Gets a variable from this session namespace.

Input
string $name name
Output
& mixed  

line 110

__isset

public bool __isset (string $name)

Determines whether a variable in this session namespace is set.

Input
string $name name
Output
bool  

line 80

__set

public void __set (string $name, mixed $value)

Sets a variable in this session namespace.

Input
string $name name
mixed $value value
Output
void  

line 123

__unset

public void __unset (string $name)

Unsets a variable in this session namespace.

Input
string $name name
Output
void