Example #1
0
 /**
  * Takes an array containing settings stored under 'username', 'password', 'database' and 'host' for
  * the matching database settings for setting up a connection.
  */
 public function __construct($configs)
 {
     $this->username = Database::issetError($configs['username'], 'Username missing from database config map');
     $this->password = Database::issetError($configs['password'], 'Password missing from database config map');
     $this->database = Database::issetError($configs['database'], 'Database to use is missing from database config map');
     $this->host = Database::issetError($configs['hostname'], 'Hostname missing from database config map');
     $this->activerecord = array();
     $this->events = null;
 }