SessionSection
class SessionSection implements IteratorAggregate, ArrayAccess
Session section.
Properties
bool | $warnOnUndefined |
Methods
Returns an iterator over all section variables.
Sets a variable in this session section.
Gets a variable from this session section.
Removes a variable or whole section.
Sets a variable in this session section.
Gets a variable from this session section.
Determines whether a variable in this session section is set.
Unsets a variable in this session section.
Sets a variable in this session section.
Gets a variable from this session section.
Determines whether a variable in this session section is set.
Unsets a variable in this session section.
Sets the expiration of the section or specific variables.
Removes the expiration from the section or specific variables.
Details
at line 35
__construct(Session $session, string $name)
Do not call directly. Use Session::getSection().
at line 45
Iterator
getIterator()
Returns an iterator over all section variables.
at line 56
void
set(string $name, mixed $value, string|null $expiration = null)
Sets a variable in this session section.
at line 72
mixed
get(string $name)
Gets a variable from this session section.
at line 87
void
remove(string|string[]|null $name = null)
Removes a variable or whole section.
at line 108
void
__set(string $name, $value)
Sets a variable in this session section.
at line 119
mixed
__get(string $name)
Gets a variable from this session section.
at line 134
bool
__isset(string $name)
Determines whether a variable in this session section is set.
at line 144
void
__unset(string $name)
Unsets a variable in this session section.
at line 153
void
offsetSet($name, $value)
Sets a variable in this session section.
at line 163
mixed
offsetGet($name)
Gets a variable from this session section.
at line 173
bool
offsetExists($name)
Determines whether a variable in this session section is set.
at line 182
void
offsetUnset($name)
Unsets a variable in this session section.
at line 194
SessionSection
setExpiration(?string $time, string|string[]|null $variables = null)
Sets the expiration of the section or specific variables.
at line 221
void
removeExpiration(string|string[]|null $variables = null)
Removes the expiration from the section or specific variables.