コード例 #1
0
 public function __construct($cas_parent, $redis)
 {
     parent::__construct($cas_parent);
     $this->_redis = $redis;
 }
コード例 #2
0
ファイル: File.php プロジェクト: dipeira/sch-progs
 /**
  * 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();
 }
コード例 #3
0
ファイル: Db.php プロジェクト: Trideon/gigolo
 /**
  * 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();
 }