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 33)
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.
SessionNamespace
setExpiration (mixed $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 42


Method Details

line 49

__construct

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

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

Input
&$data
&$meta
Output
SessionNamespace  

line 61

getIterator

public ArrayIterator getIterator ()

Returns an iterator over all namespace variables.

Implementation of:

IteratorAggregate::getIterator
Output
ArrayIterator  

line 162

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 149

offsetGet

public mixed offsetGet (string $name)

Gets a variable from this session namespace.

Implementation of:

ArrayAccess::offsetGet
Input
string $name name
Output
mixed  

line 136

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 175

offsetUnset

public void offsetUnset (string $name)

Unsets a variable in this session namespace.

Implementation of:

ArrayAccess::offsetUnset
Input
string $name name
Output
void  

line 247

remove

public void remove ()

Cancels the current session namespace.

Output
void  

line 225

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 188

setExpiration

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

Sets the expiration of the namespace or specific variables.

Input
mixed $seconds time in seconds, value 0 means "until the browser is closed"
mixed $variables optional list of variables / single variable to expire
Output
SessionNamespace provides a fluent interface

line 92

__get

public mixed & __get (string $name)

Gets a variable from this session namespace.

Input
string $name name
Output
& mixed  

line 109

__isset

public bool __isset (string $name)

Determines whether a variable in this session namespace is set.

Input
string $name name
Output
bool  

line 79

__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 122

__unset

public void __unset (string $name)

Unsets a variable in this session namespace.

Input
string $name name
Output
void