Fat-Free Framework: Basket Class Reference

Fat-Free-Framework

Fat-Free Framework  3.1.0 API 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
$keystring

Member Function Documentation

Basket::checkout ( )

Check out basket contents

Returns
array
Basket::clear (   $key)

Delete field

Returns
NULL
Parameters
$keystring
Basket::copyfrom (   $key)

Hydrate item using hive array variable

Returns
NULL
Parameters
$keystring
Basket::copyto (   $key)

Populate hive array variable with item contents

Returns
NULL
Parameters
$keystring
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
$keystring
$valmixed
Basket::exists (   $key)

Return TRUE if field is defined

Returns
bool
Parameters
$keystring
Basket::find (   $key,
  $val 
)

Return item that matches key/value pair

Returns
object|FALSE
Parameters
$keystring
$valmixed
Basket::get (   $key)

Retrieve value of field

Returns
scalar|FALSE
Parameters
$keystring
Basket::load (   $key,
  $val 
)

Map current item to matching key/value pair

Returns
array
Parameters
$keystring
$valmixed
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
$keystring
$valscalar

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   doxygen 1.8.4