tp TouchPointWP Utilities Session - TenthPres/TouchPoint-WP GitHub Wiki
tp\TouchPointWP\Utilities\Session
This class wraps handlers for $_SESSION to make it more easily workable.
- Full name:
\tp\TouchPointWP\Utilities\Session - Warning: this class is deprecated. This means that this class will likely be removed in a future version.
Methods
startSession
Start a session if one doesn't already exist.
public static startSession(array $options = []): bool
- This method is static.* Warning: this method is deprecated. This means that this method will likely be removed in a future version. Parameters:
| Parameter | Type | Description |
|---|---|---|
$options |
array | Options passed directly to session_start, but only if the session isn't yet active. |
Return Value:
True if a session has been started (with this call or previously)
sessionDestroy
public static sessionDestroy(): bool
- This method is static.
instance
public static instance(): \tp\TouchPointWP\Utilities\Session|null
- This method is static.* Warning: this method is deprecated. This means that this method will likely be removed in a future version.
__get
Standard getter, though returns null if unset or session isn't established.
public __get(string $what): mixed|null
Parameters:
| Parameter | Type | Description |
|---|---|---|
$what |
string |
__set
Standard setter
public __set(string $what, mixed $value): void
Parameters:
| Parameter | Type | Description |
|---|---|---|
$what |
string | |
$value |
mixed |