public function __construct($table = null) { //db connector config $this->_dbUse = 'master'; $this->_dbConfigs = (require "../utils/MysqlConfig.php"); //PDOAdapter config $this->_prefix = $this->_dbConfigs[$this->_dbUse]["db_table_pre"]; $this->_debug = $this->_dbConfigs[$this->_dbUse]["db_debug"]; $this->_fetchType = PDO::FETCH_OBJ; // get db connection manager $this->_connector = MyPDOConnector::getInstance()->loadConfigs($this->_dbConfigs); $this->_cacher = MyPDOCacher::getInstance(); parent::__construct($table); }
public function __construct($table = null) { //db connector config $this->_dbUse = Slim::getInstance()->config('database')['default']; $this->_dbConfigs = Slim::getInstance()->config('database')['connections']; //PDOAdapter config $this->_prefix = $this->_dbConfigs[$this->_dbUse]["prefix"]; $this->_debug = $this->_dbConfigs[$this->_dbUse]["true"]; $this->_fetchType = PDO::FETCH_ASSOC; // get db connection manager $this->_connector = MyPDOConnector::getInstance()->loadConfigs($this->_dbConfigs); $this->_cacher = MyPDOCacher::getInstance(); parent::__construct($table); }