Example #1
0
 public function __construct()
 {
     $dbsetList = Configure::db();
     $dbName = array_keys($dbsetList)[0];
     if ($dbName) {
         $this->connect($dbName);
     }
 }
Example #2
0
 public function __construct($dbName = '')
 {
     $options = Configure::db($dbName);
     $options = array_merge($options, array('options' => array('buffer_results' => true)));
     parent::addExt(new \Zend\Db\Adapter\Adapter($options));
 }