1 Star 0 Fork 193

程序源代码/video

forked from 后盾人/v2015 
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
Cache.php 1.25 KB
Copy Edit Raw Blame History
后盾人 authored 2017-05-02 15:00 +08:00 . no message
<?php
/** .-------------------------------------------------------------------
* | Software: [HDCMS framework]
* | Site: www.hdcms.com
* |-------------------------------------------------------------------
* | Author: 向军 <2300071698@qq.com>
* | WeChat: aihoudun
* | Copyright (c) 2012-2019, www.houdunwang.com. All Rights Reserved.
* '-------------------------------------------------------------------*/
namespace hdphp\cache;
/**
* 缓存处理基类
* Class Cache
*
* @package Hdphp\Cache
* @author 向军 <2300071698@qq.com>
*/
class Cache {
//应用
public $app;
//连接
protected $connect;
public function __construct( $app ) {
$this->app = $app;
$driver = '\hdphp\cache\\' .ucfirst(Config::get( 'cache.type' ));
$this->connect = new $driver;
}
//更改缓存驱动
public function driver( $driver ) {
$driver = '\hdphp\cache\\' . $driver;
$this->connect = new $driver;
return $this;
}
public function __call( $method, $params ) {
if ( method_exists( $this->connect, $method ) ) {
return call_user_func_array( [ $this->connect, $method ], $params );
} else {
return $this;
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/itcode-itcode/video.git
git@gitee.com:itcode-itcode/video.git
itcode-itcode
video
video
master

Search