* @license PHP License * @package WB * @subpackage db */ /** * Simple datasource filler * * @version 0.1.1 * @package WB * @subpackage db */ abstract class WBDatasource_Filler extends WBStdClass { /** * fillers's parameter list * * Concrete classes fill these with default paremeter * @var array */ protected $parameter = array(); /** * configure filler * * Merge default parameters with given one's * @param array $params */ final public function configure($params = array()) { if (!is_array($params)) { $params = array(); } $this->parameter = array_merge($this->parameter, $params); } /** * Start handler * * Things to do at first item * * @param array $item * @return void */ public function onStart(&$item) { } /** * actually decorate list item * * @param array $item * @return bool true to continue */ public function mergeItem2List($item, &$list) { return true; } /** * End handler * * Things to do after last item * * @return void */ public function onEnd() { } }