src/Session/AppSession.php
get accesses the super-global variable $_SESSION. Open
Open
public function get($param)
{
$this->sessionStart();
return $_SESSION[$param] ?? null;
}
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
exists accesses the super-global variable $_SESSION. Open
Open
public function exists($param): bool
{
$this->sessionStart();
return array_key_exists($param, $_SESSION);
}
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
set accesses the super-global variable $_SESSION. Open
Open
public function set($param, $value): void
{
$this->sessionStart();
$_SESSION[$param] = $value;
session_commit();
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
unset accesses the super-global variable $_SESSION. Open
Open
public function unset($param): void
{
$this->sessionStart();
unset($_SESSION[$param]);
session_commit();
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}