Ejemplo n.º 1
0
 /**
  * This method is used to initialize the storage. Halts on error.
  *
  * @public
  */
 function init()
 {
     phpCAS::traceBegin();
     // if the storage has already been initialized, return immediatly
     if ($this->isInitialized()) {
         return;
     }
     // call the ancestor's method (mark as initialized)
     parent::init();
     // try to connect to the database
     $this->_link = DB::connect($this->getURL());
     if (DB::isError($this->_link)) {
         phpCAS::error('could not connect to database (' . DB::errorMessage($this->_link) . ')');
     }
     var_dump($this->_link);
     phpCAS::traceBEnd();
 }
 /**
  * This method is used to initialize the storage. Halts on error.
  *
  * @public
  */
 function init()
 {
     phpCAS::traceBegin();
     // if the storage has already been initialized, return immediatly
     if ($this->isInitialized()) {
         return;
     }
     // call the ancestor's method (mark as initialized)
     parent::init();
     //include phpDB library (the test was introduced in release 0.4.8 for
     //the integration into Tikiwiki).
     if (!class_exists('DB')) {
         include_once 'DB.php';
     }
     // try to connect to the database
     $this->_link = DB::connect($this->getURL());
     if (DB::isError($this->_link)) {
         phpCAS::error('could not connect to database (' . DB::errorMessage($this->_link) . ')');
     }
     var_dump($this->_link);
     phpCAS::traceBEnd();
 }