Fat-Free Framework
3.1.0 API Reference
|
Basket Class Reference
Session-based pseudo-mapper. More...
Public Member Functions | |
exists ($key) | |
set ($key, $val) | |
get ($key) | |
clear ($key) | |
find ($key, $val) | |
load ($key, $val) | |
dry () | |
count () | |
save () | |
erase ($key, $val) | |
reset () | |
drop () | |
copyfrom ($key) | |
copyto ($key) | |
checkout () | |
__construct ($key='basket') | |
Public Attributes | |
$id | |
Current item identifier. | |
$item =array() | |
Current item contents. | |
const | E_Field ='Undefined field %s' |
Protected Attributes | |
$key | |
Session key. | |
Detailed Description
Session-based pseudo-mapper.
Constructor & Destructor Documentation
Basket::__construct | ( | $key = 'basket' ) |
Instantiate class
- Returns
- void
- Parameters
-
$key string
Member Function Documentation
Basket::checkout | ( | ) |
Check out basket contents
- Returns
- array
Basket::clear | ( | $key) |
Delete field
- Returns
- NULL
- Parameters
-
$key string
Basket::copyfrom | ( | $key) |
Hydrate item using hive array variable
- Returns
- NULL
- Parameters
-
$key string
Basket::copyto | ( | $key) |
Populate hive array variable with item contents
- Returns
- NULL
- Parameters
-
$key string
Basket::count | ( | ) |
Return number of items in basket
- Returns
- int
Basket::drop | ( | ) |
Empty basket
- Returns
- NULL
Basket::dry | ( | ) |
Return TRUE if current item is empty/undefined
- Returns
- bool
Basket::erase | ( | $key, | |
$val | |||
) |
Erase item matching key/value pair
- Returns
- bool
- Parameters
-
$key string $val mixed
Basket::exists | ( | $key) |
Return TRUE if field is defined
- Returns
- bool
- Parameters
-
$key string
Basket::find | ( | $key, | |
$val | |||
) |
Return item that matches key/value pair
- Returns
- object|FALSE
- Parameters
-
$key string $val mixed
Basket::get | ( | $key) |
Retrieve value of field
- Returns
- scalar|FALSE
- Parameters
-
$key string
Basket::load | ( | $key, | |
$val | |||
) |
Map current item to matching key/value pair
- Returns
- array
- Parameters
-
$key string $val mixed
Basket::reset | ( | ) |
Reset cursor
- Returns
- NULL
Basket::save | ( | ) |
Save current item
- Returns
- array
Basket::set | ( | $key, | |
$val | |||
) |
Assign value to field
- Returns
- scalar|FALSE
- Parameters
-
$key string $val scalar
The documentation for this class was generated from the following file:
- basket.php
Generated on Mon Aug 19 2013 21:27:46 for Fat-Free Framework by 1.8.4