Class SessionNamespace (namespace Nette\Web)


Session namespace for Session.

Object
   |
   --SessionNamespace

Implements interfaces:

IteratorAggregate (internal interface), ArrayAccess (internal interface)
Copyright: Copyright (c) 2004, 2010 David Grudl
Located: in /Web/SessionNamespace.php (line 21)
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 (string|int|DateTime $time, [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 30


Method Details

line 37

__construct

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

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

Input
&$data
&$meta
Output
SessionNamespace  

line 49

getIterator

public ArrayIterator getIterator ()

Returns an iterator over all namespace variables.

Implementation of:

IteratorAggregate::getIterator
Output
ArrayIterator  

line 153

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 140

offsetGet

public mixed offsetGet (string $name)

Gets a variable from this session namespace.

Implementation of:

ArrayAccess::offsetGet
Input
string $name name
Output
mixed  

line 127

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 166

offsetUnset

public void offsetUnset (string $name)

Unsets a variable in this session namespace.

Implementation of:

ArrayAccess::offsetUnset
Input
string $name name
Output
void  

line 235

remove

public void remove ()

Cancels the current session namespace.

Output
void  

line 213

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 179

setExpiration

public SessionNamespace setExpiration (string|int|DateTime $time, [mixed $variables = NULL])

Sets the expiration of the namespace or specific variables.

Input
string|int|DateTime $time time, 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 83

__get

public mixed & __get (string $name)

Gets a variable from this session namespace.

Input
string $name name
Output
& mixed  

line 100

__isset

public bool __isset (string $name)

Determines whether a variable in this session namespace is set.

Input
string $name name
Output
bool  

line 67

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

__unset

public void __unset (string $name)

Unsets a variable in this session namespace.

Input
string $name name
Output
void