public function __construct($cas_parent, $redis)
 {
     parent::__construct($cas_parent);
     $this->_redis = $redis;
 }
Exemple #2
0
 /**
  * This method is used to initialize the storage. Halts on error.
  *
  * @return void
  * @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();
     phpCAS::traceEnd();
 }
Exemple #3
0
 /**
  * This method is used to initialize the storage. Halts on error.
  *
  * @return void
  */
 public function init()
 {
     phpCAS::traceBegin();
     // if the storage has already been initialized, return immediatly
     if ($this->isInitialized()) {
         return;
     }
     // initialize the base object
     parent::init();
     // create the PDO object if it doesn't exist already
     if (!$this->_pdo instanceof PDO) {
         try {
             $this->_pdo = new PDO($this->_dsn, $this->_username, $this->_password, $this->_driver_options);
         } catch (PDOException $e) {
             phpCAS::error('Database connection error: ' . $e->getMessage());
         }
     }
     phpCAS::traceEnd();
 }