STORE
in package
STORE
Transparently store, remove, and retrieve sessions and/or tempStorage items.
If browserTabID is on, and available in the page, use tempStorage in preference to session
Table of Contents
Methods
- __construct() : mixed
- STORE
- getArray() : array<string|int, mixed>
- Get array
- getItems() : mixed
- Get item(s). If more than one item is required, return a keyed array, else a string
- prettyPrint() : void
- Pretty print all items. Mainly used for debugging purposes
- removeArray() : void
- Remove array
- removeItems() : void
- Remove items
- setArray() : void
- Set array
- setItems() : void
- Set items
- updateDb() : void
- Write tempStorage to database if using browserTabID Particularly if using header() to navigate, tempStorage variables must be written to the database then emptied before fetching again from the database, initializing tempStorage, and THEN calling header().
Methods
__construct()
STORE
public
__construct() : mixed
getArray()
Get array
public
getArray(string $type) : array<string|int, mixed>
Parameters
- $type : string
Return values
array<string|int, mixed>getItems()
Get item(s). If more than one item is required, return a keyed array, else a string
public
getItems(array<string|int, mixed> $fields) : mixed
Parameters
- $fields : array<string|int, mixed>
prettyPrint()
Pretty print all items. Mainly used for debugging purposes
public
prettyPrint([mixed $key = false ]) : void
Parameters
- $key : mixed = false
-
Default = FALSE
removeArray()
Remove array
public
removeArray(string $type[, bool $storeNow = false ]) : void
Parameters
- $type : string
- $storeNow : bool = false
-
(Default FALSE)
removeItems()
Remove items
public
removeItems(array<string|int, mixed> $array[, bool $storeNow = false ]) : void
Parameters
- $array : array<string|int, mixed>
- $storeNow : bool = false
-
(Default FALSE)
setArray()
Set array
public
setArray(array<string|int, mixed> $array, string $prefix[, bool $storeNow = false ]) : void
Parameters
- $array : array<string|int, mixed>
- $prefix : string
- $storeNow : bool = false
-
(Default FALSE)
setItems()
Set items
public
setItems(array<string|int, mixed> $array[, bool $storeNow = false ]) : void
Parameters
- $array : array<string|int, mixed>
- $storeNow : bool = false
-
(Default FALSE)
updateDb()
Write tempStorage to database if using browserTabID Particularly if using header() to navigate, tempStorage variables must be written to the database then emptied before fetching again from the database, initializing tempStorage, and THEN calling header().
public
updateDb() : void