Example #1
0
 public function __construct()
 {
     parent::__construct();
     if (!($mconfig = $this->_config->moodle) || !$mconfig->database) {
         throw new Exception('Moodle database authentication type incorrectly configured.');
     }
     $this->_mdb = Zend_Db::factory($mconfig->database);
     $this->_mdb->setFetchMode(Zend_Db::FETCH_OBJ);
 }
Example #2
0
 public function __construct()
 {
     parent::__construct();
     $ldapOpts = $this->_config->ldap->params;
     if ($ldapOpts == null) {
         throw new Exception('LDAP options not configured.', 102);
     }
     $ldapOpts = $ldapOpts->toArray();
     $ldapOpts['bindRequiresDn'] = true;
     $this->_ldap = new Zend_Ldap($ldapOpts);
 }
Example #3
0
 public function __construct()
 {
     parent::__construct();
     Sahara_Database::getDatabase();
 }