WC_Session
in package
WC_Session
Table of Contents
- $_customer_id : int
- Customer ID.
- $_data : array<string|int, mixed>
- Session Data.
- $_dirty : bool
- Dirty when the session needs saving.
- __get() : mixed
- Magic get method.
- __isset() : bool
- Magic isset method.
- __set() : mixed
- Magic set method.
- __unset() : mixed
- Magic unset method.
- cleanup_sessions() : mixed
- Cleanup session data. Extended by child classes.
- get() : array<string|int, mixed>|string
- Get a session variable.
- get_customer_id() : int
- Get customer ID.
- init() : mixed
- Init hooks and session data. Extended by child classes.
- set() : mixed
- Set a session variable.
Properties
$_customer_id
Customer ID.
protected
int
$_customer_id
$_data
Session Data.
protected
array<string|int, mixed>
$_data
= array()
$_dirty
Dirty when the session needs saving.
protected
bool
$_dirty
= alse
Methods
__get()
Magic get method.
public
__get(mixed $key) : mixed
Parameters
- $key : mixed
-
Key to get.
Return values
mixed —__isset()
Magic isset method.
public
__isset(mixed $key) : bool
Parameters
- $key : mixed
-
Key to check.
Return values
bool —__set()
Magic set method.
public
__set(mixed $key, mixed $value) : mixed
Parameters
- $key : mixed
-
Key to set.
- $value : mixed
-
Value to set.
Return values
mixed —__unset()
Magic unset method.
public
__unset(mixed $key) : mixed
Parameters
- $key : mixed
-
Key to unset.
Return values
mixed —cleanup_sessions()
Cleanup session data. Extended by child classes.
public
cleanup_sessions() : mixed
Return values
mixed —get()
Get a session variable.
public
get(string $key[, mixed $default = null ]) : array<string|int, mixed>|string
Parameters
- $key : string
-
Key to get.
- $default : mixed = null
-
used if the session variable isn't set.
Return values
array<string|int, mixed>|string — value of session variableget_customer_id()
Get customer ID.
public
get_customer_id() : int
Return values
int —init()
Init hooks and session data. Extended by child classes.
public
init() : mixed
Tags
Return values
mixed —set()
Set a session variable.
public
set(string $key, mixed $value) : mixed
Parameters
- $key : string
-
Key to set.
- $value : mixed
-
Value to set.