Class: atkSessionStore
Source Location: /session/class.atksessionstore.inc
Class atkSessionStore
Property Summary
| static array |
$_instances |
Instances of the session store, indexed by key |
Method Summary
| atkSessionStore |
__construct() |
Create a new sessionstore |
| mixed |
addDataRow() |
Add a row to the current sessionstore. |
| mixed |
getData() |
Get all the data in the session for the current key |
| mixed |
getKey() |
Get the key for the current sessionstore |
| mixed |
setData() |
Set ALL data in the session for the current key |
Properties
Instances of the session store, indexed by key
API Tags:
Methods
static atkSessionStore getInstance(
[mixed
$key = false], [bool
$reset = false]
)
|
|
Get the current instance for the session storage
Parameters:
|
mixed |
$key: |
Key to use |
|
bool |
$reset: |
Wether to reset the singleton |
API Tags:
| Return: | Storage |
| Access: | public |
static mixed getKeyFromSession(
)
|
|
Try to get the current key from the session
API Tags:
| Return: | Key to use, false if we don't have a key |
| Access: | private |
static mixed getRowKeyFromSelector(
string
$selector
)
|
|
Get rowkey from an ATK/SQL selector
We sneak rowkeys in the selectors as negative ids.
Parameters:
API Tags:
| Return: | Key in negative int form or false if we failed to get the key |
| Access: | private |
static mixed getSessionManager(
)
|
|
Get the sessionmanager to use
API Tags:
| Return: | Sessionmanager or false if we don't have a session |
| Access: | protected |
atkSessionStore __construct(
mixed
$key
)
|
|
Create a new sessionstore
Parameters:
API Tags:
mixed addDataRow(
array
$row, string
$primary_key_field
)
|
|
Add a row to the current sessionstore.
Also sets the primary key field to a fake negative id
Parameters:
|
array |
$row: |
Row to store in the session |
|
string |
$primary_key_field: |
Primary key field to use and set with the row key |
API Tags:
| Return: | Primary key for the added record, or false if we don't have a session |
| Access: | public |
bool deleteDataRowForSelector(
string
$selector
)
|
|
Delete a row in the session for a given ATK/SQL selector
Parameters:
|
string |
$selector: |
ATK/SQL selector |
API Tags:
| Return: | Wether the deleting succeeded |
| Access: | public |
Get all the data in the session for the current key
API Tags:
| Return: | Data in array form or false if we don't have a key or session |
| Access: | public |
mixed getDataRowForSelector(
string
$selector
)
|
|
Get a data row from the session for an ATK/SQL selector
Parameters:
API Tags:
| Return: | Row or false if there is nothing |
| Access: | public |
Get the key for the current sessionstore
API Tags:
| Return: | Key |
| Access: | public |
mixed setData(
array
$data
)
|
|
Set ALL data in the session for the current key
Parameters:
API Tags:
| Return: | Data that was set or false if we don't have a key or session |
| Access: | private |
mixed updateDataRowForSelector(
string
$selector, array
$row
)
|
|
Update (set) a row in the session for an ATK/SQL selector
Parameters:
|
string |
$selector: |
ATK/SQL selector |
|
array |
$row: |
New row |
API Tags:
| Return: | Updated row or false if updating failed |
| Access: | public |