class SessionSection implements IteratorAggregate, ArrayAccess

Session section.

Properties

bool $warnOnUndefined

Methods

__construct(Session $session, string $name)

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

getIterator()

Returns an iterator over all section variables.

void
set(string $name, mixed $value, string $expiration = null)

Sets a variable in this session section.

mixed
get(string $name)

Gets a variable from this session section.

void
remove(string|string[]|null $name = null)

Removes a variable or whole section.

void
__set(string $name, $value)

Sets a variable in this session section.

mixed
__get(string $name)

Gets a variable from this session section.

bool
__isset(string $name)

Determines whether a variable in this session section is set.

void
__unset(string $name)

Unsets a variable in this session section.

void
offsetSet($name, $value)

Sets a variable in this session section.

offsetGet($name)

No description

bool
offsetExists($name)

Determines whether a variable in this session section is set.

void
offsetUnset($name)

Unsets a variable in this session section.

setExpiration(?string $time, string|string[]|null $variables = null)

Sets the expiration of the section or specific variables.

void
removeExpiration(string|string[]|null $variables = null)

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().

Parameters

Session $session
string $name

at line 45
Iterator getIterator()

Returns an iterator over all section variables.

Return Value

Iterator

at line 56
void set(string $name, mixed $value, string $expiration = null)

Sets a variable in this session section.

Parameters

string $name
mixed $value
string $expiration

Return Value

void

at line 72
mixed get(string $name)

Gets a variable from this session section.

Parameters

string $name

Return Value

mixed

at line 86
void remove(string|string[]|null $name = null)

Removes a variable or whole section.

Parameters

string|string[]|null $name

Return Value

void

at line 107
void __set(string $name, $value)

Sets a variable in this session section.

Parameters

string $name
$value

Return Value

void

at line 118
mixed __get(string $name)

Gets a variable from this session section.

Parameters

string $name

Return Value

mixed

at line 133
bool __isset(string $name)

Determines whether a variable in this session section is set.

Parameters

string $name

Return Value

bool

at line 143
void __unset(string $name)

Unsets a variable in this session section.

Parameters

string $name

Return Value

void

at line 152
void offsetSet($name, $value)

Sets a variable in this session section.

Parameters

$name
$value

Return Value

void

at line 158
offsetGet($name)

No description

Parameters

$name

at line 172
bool offsetExists($name)

Determines whether a variable in this session section is set.

Parameters

$name

Return Value

bool

at line 181
void offsetUnset($name)

Unsets a variable in this session section.

Parameters

$name

Return Value

void

at line 193
SessionSection setExpiration(?string $time, string|string[]|null $variables = null)

Sets the expiration of the section or specific variables.

Parameters

?string $time
string|string[]|null $variables

list of variables / single variable to expire

Return Value

SessionSection

at line 219
void removeExpiration(string|string[]|null $variables = null)

Removes the expiration from the section or specific variables.

Parameters

string|string[]|null $variables

list of variables / single variable to expire

Return Value

void

Traits

Strict class for better experience.