public function __construct($data = array()) { //FIXME Date patterns used by Chart.js are different from PHP's... :( //$this->_defaultData['scale_date_time_format'] = I18n::instance()->getDateFormatterInstance()->getPattern(); $this->_defaultData['scale_date_time_format'] = 'yyyy-mm-dd'; $this->_defaultData['scale_date_format'] = 'yyyy-mm-dd'; parent::__construct(array_merge(self::$_commonDefaultData, $this->_defaultData, $data)); }
public function __construct(array $params = array()) { parent::__construct($params); if (!isset($params['resource_config']['db'])) { throw new \Exception('Missing DB config'); } $this->setDb(new Adapter($params['resource_config']['db'])); }