* @license PHP License * @package WB * @subpackage db */ /** * Datasource renderer base class * * @version 0.1.1 * @package WB * @subpackage db */ class WBDatasource_Renderer extends WBStdClass { /** * Configuration parameters */ protected $config = array(); /** * Set configuration values */ public function setConfig($config = array()) { if (!is_array($config)) { return; } $this->config = array_merge($this->config, $config); } /** * start rendering * * Things to do just before iterating through datasource * @param string $datasource name separated with slashes */ public function start($datasource) { } /** * render single item * * The consumer for data source iteratrion * @param array $item */ public function renderItem($item) { } /** * finish rendering * * Things to do after iterating through datasource */ public function end() { } } ?>