コード例 #1
0
ファイル: Cache.class.php プロジェクト: xupengphp/oneapi
 /**
  * 取得缓存类实例
  * @static
  * @access public
  * @return mixed
  */
 static function getInstance($type = '', $options = array())
 {
     static $_instance = array();
     $guid = $type . to_guid_string($options);
     if (!isset($_instance[$guid])) {
         $obj = new Cache();
         $_instance[$guid] = $obj->connect($type, $options);
     }
     return $_instance[$guid];
 }