SessionSection
class SessionSection implements IteratorAggregate, ArrayAccess
Session section.
Methods
Returns an iterator over all section variables.
Sets a variable in this session section. Passing null removes it.
Gets a variable from this session section.
Removes a variable or a list of variables from this section. With no argument, removes the entire section.
No description
No description
No description
No description
No description
No description
No description
No description
Sets the expiration time for the whole section or for specific variables.
Removes the expiration from the whole section or from specific variables.
Details
at line 23
__construct(Session $session, string $name)
Do not call directly. Use Session::getSection().
at line 34
Iterator
getIterator()
Returns an iterator over all section variables.
at line 45
void
set(string $name, mixed $value, string|null $expire = null)
Sets a variable in this session section. Passing null removes it.
The optional $expire sets per-variable expiration as a time string (e.g. '30 seconds').
at line 60
mixed
get(string $name)
Gets a variable from this session section.
at line 75
void
remove(string|array|null $name = null)
Removes a variable or a list of variables from this section. With no argument, removes the entire section.
at line 93
void
__set(string $name, mixed $value)
No description
at line 102
mixed
__get(string $name)
No description
at line 112
bool
__isset(string $name)
No description
at line 121
void
__unset(string $name)
No description
at line 129
void
offsetSet($name, $value)
No description
at line 138
mixed
offsetGet($name)
No description
at line 146
bool
offsetExists($name)
No description
at line 154
void
offsetUnset($name)
No description
at line 167
SessionSection
setExpiration(string|null $expire, string|array|null $variables = null)
Sets the expiration time for the whole section or for specific variables.
Pass null to clear the expiration.
at line 195
void
removeExpiration(string|array|null $variables = null)
Removes the expiration from the whole section or from specific variables.