作者 郭盛
1 个管道 的构建 通过 耗费 0 秒

上传七牛云等文件配置

... ... @@ -7,6 +7,8 @@ use app\common\model\Area;
use app\common\model\Version;
use fast\Random;
use think\Config;
use Qiniu\Storage\UploadManager;
use Qiniu\Auth;
/**
* 公共接口
... ... @@ -41,102 +43,83 @@ class Common extends Api
}
/**
* 上传文件
* @ApiMethod (POST)
* @param File $file 文件流
*/
public function upload()
{
$file = $this->request->file('file');
if (empty($file)) {
$this->error(__('No file upload or server upload limit exceeded'));
}
//判断是否已经存在附件
$sha1 = $file->hash();
$upload = Config::get('upload');
preg_match('/(\d+)(\w+)/', $upload['maxsize'], $matches);
$type = strtolower($matches[2]);
$typeDict = ['b' => 0, 'k' => 1, 'kb' => 1, 'm' => 2, 'mb' => 2, 'gb' => 3, 'g' => 3];
$size = (int)$upload['maxsize'] * pow(1024, isset($typeDict[$type]) ? $typeDict[$type] : 0);
$fileInfo = $file->getInfo();
$suffix = strtolower(pathinfo($fileInfo['name'], PATHINFO_EXTENSION));
$suffix = $suffix && preg_match("/^[a-zA-Z0-9]+$/", $suffix) ? $suffix : 'file';
$mimetypeArr = explode(',', strtolower($upload['mimetype']));
$typeArr = explode('/', $fileInfo['type']);
* @ApiTitle (上传文件)
* @ApiSummary (上传文件)
* @ApiMethod (POST)
* @ApiRoute (/api/common/uploadFile)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
*
* @ApiParams (name="image[]", type="file", required=false, description="图片")
*
* @ApiReturn({
"code": 1,
"msg": "SUCCESS",
"time": "1553839125",
"data": {
//禁止上传PHP和HTML文件
if (in_array($fileInfo['type'], ['text/x-php', 'text/html']) || in_array($suffix, ['php', 'html', 'htm'])) {
$this->error(__('Uploaded file format is limited'));
}
})
*/
public function uploadFile(){
$files = request()->file('image');
if (empty($files)) {
$this->error('未检出文件上传');
}
//验证文件后缀
if ($upload['mimetype'] !== '*' &&
(
!in_array($suffix, $mimetypeArr)
|| (stripos($typeArr[0] . '/', $upload['mimetype']) !== false && (!in_array($fileInfo['type'], $mimetypeArr) && !in_array($typeArr[0] . '/*', $mimetypeArr)))
)
) {
$this->error(__('Uploaded file format is limited'));
$countFile = count($files);
if($countFile > 5) {
$this->error('最多上传5张图片');
}
//验证是否为图片文件
$imagewidth = $imageheight = 0;
if (in_array($fileInfo['type'], ['image/gif', 'image/jpg', 'image/jpeg', 'image/bmp', 'image/png', 'image/webp']) || in_array($suffix, ['gif', 'jpg', 'jpeg', 'bmp', 'png', 'webp'])) {
$imgInfo = getimagesize($fileInfo['tmp_name']);
if (!$imgInfo || !isset($imgInfo[0]) || !isset($imgInfo[1])) {
$this->error(__('Uploaded file is not a valid image'));
$url2 = '';
$host = "http://q3fjhcx63.bkt.clouddn.com"; //七牛云地址
foreach ($files as $file){
//移动到框架应用根目录/public/uploads/ 目录下
$moveUrl = ROOT_PATH . 'public' . DS . 'uploads';
$info = $file->move(ROOT_PATH . 'public' . DS . 'uploads');
if($info){
//上传七牛云逻辑
$url = str_replace('//', '/', str_replace('\\', '/', $info->getSaveName())); //20190602/1214564654.jpg目录
$filePath = $moveUrl.DS.$url;//本地磁盘路径
//上传至七牛云文件路径
$qiniu_file = 'uploads/'.$url;
$upManager = new UploadManager();
$config = get_addon_config('qiniu');
// 构建鉴权对象
$auth = new Auth($config['app_key'], $config['secret_key']);
// 生成上传 Token
$token = $auth->uploadToken($config['bucket']);
// 调用 UploadManager 的 putFile 方法进行文件的上传。
$qi_res = $upManager->putFile($token,$qiniu_file , $filePath);
if($qi_res){
$a = $host.'/'.$qiniu_file;
$sys = $this->getOperateSys();
//删除本地服务器图片逻辑
if($sys == 'Linux'){
unlink($filePath);//适用于linux
}
$url2 .= $a.',';
// $fan .= '/'.$qiniu_file.',';
}else{
$this->error('上传七牛云出错!');
}
}else{
$this->error($files->getError());
}
$imagewidth = isset($imgInfo[0]) ? $imgInfo[0] : $imagewidth;
$imageheight = isset($imgInfo[1]) ? $imgInfo[1] : $imageheight;
}
$replaceArr = [
'{year}' => date("Y"),
'{mon}' => date("m"),
'{day}' => date("d"),
'{hour}' => date("H"),
'{min}' => date("i"),
'{sec}' => date("s"),
'{random}' => Random::alnum(16),
'{random32}' => Random::alnum(32),
'{filename}' => $suffix ? substr($fileInfo['name'], 0, strripos($fileInfo['name'], '.')) : $fileInfo['name'],
'{suffix}' => $suffix,
'{.suffix}' => $suffix ? '.' . $suffix : '',
'{filemd5}' => md5_file($fileInfo['tmp_name']),
];
$savekey = $upload['savekey'];
$savekey = str_replace(array_keys($replaceArr), array_values($replaceArr), $savekey);
$this->success('SUCCESS',rtrim($url2,','));
}
$uploadDir = substr($savekey, 0, strripos($savekey, '/') + 1);
$fileName = substr($savekey, strripos($savekey, '/') + 1);
//
$splInfo = $file->validate(['size' => $size])->move(ROOT_PATH . '/public' . $uploadDir, $fileName);
if ($splInfo) {
$params = array(
'admin_id' => 0,
'user_id' => (int)$this->auth->id,
'filesize' => $fileInfo['size'],
'imagewidth' => $imagewidth,
'imageheight' => $imageheight,
'imagetype' => $suffix,
'imageframes' => 0,
'mimetype' => $fileInfo['type'],
'url' => $uploadDir . $splInfo->getSaveName(),
'uploadtime' => time(),
'storage' => 'local',
'sha1' => $sha1,
);
$attachment = model("attachment");
$attachment->data(array_filter($params));
$attachment->save();
\think\Hook::listen("upload_after", $attachment);
$this->success(__('Upload successful'), [
'url' => $uploadDir . $splInfo->getSaveName()
]);
} else {
// 上传失败获取错误信息
$this->error($file->getError());
//判断当前操作系统
public function getOperateSys(){
$os_name = php_uname('s');
//判断
if(strpos($os_name,"Linux")!==false){
$os_str="Linux";
}else if(strpos($os_name,"Windows")!==false){
$os_str="Windows";
}else{
$os_str='';
}
return $os_str;
}
}
... ...
... ... @@ -18,6 +18,7 @@ class Index extends Api
*/
public function index()
{
$user_id = $this->getUserId();
$this->success('请求成功');
}
}
... ...
... ... @@ -24,7 +24,8 @@
"phpmailer/phpmailer": "^5.2",
"karsonzhang/fastadmin-addons": "~1.1.9",
"overtrue/pinyin": "~3.0",
"phpoffice/phpspreadsheet": "^1.2"
"phpoffice/phpspreadsheet": "^1.2",
"qiniu/php-sdk": "^7.2"
},
"config": {
"preferred-install": "dist"
... ...
... ... @@ -143,28 +143,29 @@
<div class="child collapse" id="公共接口">
<a href="javascript:;" data-id="0" class="list-group-item">加载初始化</a>
<a href="javascript:;" data-id="1" class="list-group-item">上传文件</a>
<a href="javascript:;" data-id="2" class="list-group-item"></a>
</div>
<a href="#邮箱验证码接口" class="list-group-item" data-toggle="collapse" data-parent="#sidebar">邮箱验证码接口 <i class="fa fa-caret-down"></i></a>
<div class="child collapse" id="邮箱验证码接口">
<a href="javascript:;" data-id="2" class="list-group-item">发送验证码</a>
<a href="javascript:;" data-id="3" class="list-group-item">检测验证码</a>
<a href="javascript:;" data-id="3" class="list-group-item">发送验证码</a>
<a href="javascript:;" data-id="4" class="list-group-item">检测验证码</a>
</div>
<a href="#首页接口" class="list-group-item" data-toggle="collapse" data-parent="#sidebar">首页接口 <i class="fa fa-caret-down"></i></a>
<div class="child collapse" id="首页接口">
<a href="javascript:;" data-id="4" class="list-group-item">首页</a>
<a href="javascript:;" data-id="5" class="list-group-item">首页</a>
</div>
<a href="#手机短信接口" class="list-group-item" data-toggle="collapse" data-parent="#sidebar">手机短信接口 <i class="fa fa-caret-down"></i></a>
<div class="child collapse" id="手机短信接口">
<a href="javascript:;" data-id="5" class="list-group-item">发送验证码</a>
<a href="javascript:;" data-id="6" class="list-group-item">检测验证码</a>
<a href="javascript:;" data-id="6" class="list-group-item">发送验证码</a>
<a href="javascript:;" data-id="7" class="list-group-item">检测验证码</a>
</div>
<a href="#登录接口" class="list-group-item" data-toggle="collapse" data-parent="#sidebar">登录接口 <i class="fa fa-caret-down"></i></a>
<div class="child collapse" id="登录接口">
<a href="javascript:;" data-id="7" class="list-group-item">获取sessionKey和openid</a>
<a href="javascript:;" data-id="8" class="list-group-item"></a>
<a href="javascript:;" data-id="9" class="list-group-item">小程序登录注册</a>
<a href="javascript:;" data-id="10" class="list-group-item">通过code获取token</a>
<a href="javascript:;" data-id="11" class="list-group-item"></a>
<a href="javascript:;" data-id="8" class="list-group-item">获取sessionKey和openid</a>
<a href="javascript:;" data-id="9" class="list-group-item"></a>
<a href="javascript:;" data-id="10" class="list-group-item">小程序登录注册</a>
<a href="javascript:;" data-id="11" class="list-group-item">通过code获取token</a>
<a href="javascript:;" data-id="12" class="list-group-item"></a>
</div>
</div>
</div>
... ... @@ -305,7 +306,7 @@
<div class="panel-heading" id="heading-1">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion1" href="#collapseOne1"> 上传文件 <span class="text-muted">/api/common/upload</span></a>
<a data-toggle="collapse" data-parent="#accordion1" href="#collapseOne1"> 上传文件 <span class="text-muted">/api/common/uploadFile</span></a>
</h4>
</div>
<div id="collapseOne1" class="panel-collapse collapse">
... ... @@ -327,7 +328,24 @@
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>token</td>
<td>string</td>
<td></td>
<td>请求的Token</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
... ... @@ -344,10 +362,10 @@
</thead>
<tbody>
<tr>
<td>image[]</td>
<td>file</td>
<td>File</td>
<td></td>
<td>文件流</td>
<td></td>
<td>图片</td>
</tr>
</tbody>
</table>
... ... @@ -364,12 +382,23 @@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<div class="headers">
<div class="form-group">
<label class="control-label" for="token">token</label>
<input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/common/upload" method="POST" name="form1" id="form1">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/common/uploadFile" method="POST" name="form1" id="form1">
<div class="form-group">
<label class="control-label" for="file">file</label>
<input type="File" class="form-control input-sm" id="file" required placeholder="文件流" name="file">
<label class="control-label" for="image[]">image[]</label>
<input type="file" class="form-control input-sm" id="image[]" placeholder="图片" name="image[]">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="1">提交</button>
... ... @@ -402,7 +431,14 @@
<div class="tab-pane" id="sample1">
<div class="row">
<div class="col-md-12">
<pre id="sample_response1"></pre>
<pre id="sample_response1">{
"code": 1,
"msg": "SUCCESS",
"time": "1553839125",
"data": {
}
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -411,13 +447,11 @@
</div>
</div>
</div>
<h2>邮箱验证码接口</h2>
<hr>
<div class="panel panel-default">
<div class="panel-heading" id="heading-2">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion2" href="#collapseOne2"> 发送验证码 <span class="text-muted">/api/ems/send</span></a>
<a data-toggle="collapse" data-parent="#accordion2" href="#collapseOne2"> <span class="text-muted">/api/common/getOperateSys</span></a>
</h4>
</div>
<div id="collapseOne2" class="panel-collapse collapse">
... ... @@ -435,6 +469,100 @@
<div class="tab-pane active" id="info2">
<div class="well">
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>正文</strong></div>
<div class="panel-body">
</div>
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox2">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/common/getOperateSys" method="get" name="form2" id="form2">
<div class="form-group">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="2">提交</button>
<button type="reset" class="btn btn-info" rel="2">重置</button>
</div>
</form>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>响应输出</strong></div>
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers2"></pre>
<pre id="response2"></pre>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>返回参数</strong></div>
<div class="panel-body">
</div>
</div>
</div>
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample2">
<div class="row">
<div class="col-md-12">
<pre id="sample_response2"></pre>
</div>
</div>
</div><!-- #sample -->
</div><!-- .tab-content -->
</div>
</div>
</div>
<h2>邮箱验证码接口</h2>
<hr>
<div class="panel panel-default">
<div class="panel-heading" id="heading-3">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion3" href="#collapseOne3"> 发送验证码 <span class="text-muted">/api/ems/send</span></a>
</h4>
</div>
<div id="collapseOne3" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab3">
<li class="active"><a href="#info3" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox3" data-toggle="tab">在线测试</a></li>
<li><a href="#sample3" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info3">
<div class="well">
发送验证码 </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
... ... @@ -478,13 +606,13 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox2">
<div class="tab-pane" id="sandbox3">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/ems/send" method="get" name="form2" id="form2">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/ems/send" method="get" name="form3" id="form3">
<div class="form-group">
<label class="control-label" for="email">email</label>
<input type="string" class="form-control input-sm" id="email" required placeholder="邮箱" name="email">
... ... @@ -494,8 +622,8 @@
<input type="string" class="form-control input-sm" id="event" required placeholder="事件名称" name="event">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="2">提交</button>
<button type="reset" class="btn btn-info" rel="2">重置</button>
<button type="submit" class="btn btn-success send" rel="3">提交</button>
<button type="reset" class="btn btn-info" rel="3">重置</button>
</div>
</form>
</div>
... ... @@ -505,8 +633,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers2"></pre>
<pre id="response2"></pre>
<pre id="response_headers3"></pre>
<pre id="response3"></pre>
</div>
</div>
</div>
... ... @@ -521,10 +649,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample2">
<div class="tab-pane" id="sample3">
<div class="row">
<div class="col-md-12">
<pre id="sample_response2"></pre>
<pre id="sample_response3"></pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -534,26 +662,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-3">
<div class="panel-heading" id="heading-4">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion3" href="#collapseOne3"> 检测验证码 <span class="text-muted">/api/ems/check</span></a>
<a data-toggle="collapse" data-parent="#accordion4" href="#collapseOne4"> 检测验证码 <span class="text-muted">/api/ems/check</span></a>
</h4>
</div>
<div id="collapseOne3" class="panel-collapse collapse">
<div id="collapseOne4" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab3">
<li class="active"><a href="#info3" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox3" data-toggle="tab">在线测试</a></li>
<li><a href="#sample3" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab4">
<li class="active"><a href="#info4" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox4" data-toggle="tab">在线测试</a></li>
<li><a href="#sample4" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info3">
<div class="tab-pane active" id="info4">
<div class="well">
检测验证码 </div>
<div class="panel panel-default">
... ... @@ -604,13 +732,13 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox3">
<div class="tab-pane" id="sandbox4">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/ems/check" method="get" name="form3" id="form3">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/ems/check" method="get" name="form4" id="form4">
<div class="form-group">
<label class="control-label" for="email">email</label>
<input type="string" class="form-control input-sm" id="email" required placeholder="邮箱" name="email">
... ... @@ -624,8 +752,8 @@
<input type="string" class="form-control input-sm" id="captcha" required placeholder="验证码" name="captcha">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="3">提交</button>
<button type="reset" class="btn btn-info" rel="3">重置</button>
<button type="submit" class="btn btn-success send" rel="4">提交</button>
<button type="reset" class="btn btn-info" rel="4">重置</button>
</div>
</form>
</div>
... ... @@ -635,8 +763,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers3"></pre>
<pre id="response3"></pre>
<pre id="response_headers4"></pre>
<pre id="response4"></pre>
</div>
</div>
</div>
... ... @@ -651,10 +779,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample3">
<div class="tab-pane" id="sample4">
<div class="row">
<div class="col-md-12">
<pre id="sample_response3"></pre>
<pre id="sample_response4"></pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -666,26 +794,26 @@
<h2>首页接口</h2>
<hr>
<div class="panel panel-default">
<div class="panel-heading" id="heading-4">
<div class="panel-heading" id="heading-5">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion4" href="#collapseOne4"> 首页 <span class="text-muted">/api/index/index</span></a>
<a data-toggle="collapse" data-parent="#accordion5" href="#collapseOne5"> 首页 <span class="text-muted">/api/index/index</span></a>
</h4>
</div>
<div id="collapseOne4" class="panel-collapse collapse">
<div id="collapseOne5" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab4">
<li class="active"><a href="#info4" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox4" data-toggle="tab">在线测试</a></li>
<li><a href="#sample4" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab5">
<li class="active"><a href="#info5" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox5" data-toggle="tab">在线测试</a></li>
<li><a href="#sample5" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info4">
<div class="tab-pane active" id="info5">
<div class="well">
首页 </div>
<div class="panel panel-default">
... ... @@ -707,19 +835,19 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox4">
<div class="tab-pane" id="sandbox5">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/index/index" method="get" name="form4" id="form4">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/index/index" method="get" name="form5" id="form5">
<div class="form-group">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="4">提交</button>
<button type="reset" class="btn btn-info" rel="4">重置</button>
<button type="submit" class="btn btn-success send" rel="5">提交</button>
<button type="reset" class="btn btn-info" rel="5">重置</button>
</div>
</form>
</div>
... ... @@ -729,8 +857,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers4"></pre>
<pre id="response4"></pre>
<pre id="response_headers5"></pre>
<pre id="response5"></pre>
</div>
</div>
</div>
... ... @@ -745,10 +873,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample4">
<div class="tab-pane" id="sample5">
<div class="row">
<div class="col-md-12">
<pre id="sample_response4"></pre>
<pre id="sample_response5"></pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -760,26 +888,26 @@
<h2>手机短信接口</h2>
<hr>
<div class="panel panel-default">
<div class="panel-heading" id="heading-5">
<div class="panel-heading" id="heading-6">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion5" href="#collapseOne5"> 发送验证码 <span class="text-muted">/api/sms/send</span></a>
<a data-toggle="collapse" data-parent="#accordion6" href="#collapseOne6"> 发送验证码 <span class="text-muted">/api/sms/send</span></a>
</h4>
</div>
<div id="collapseOne5" class="panel-collapse collapse">
<div id="collapseOne6" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab5">
<li class="active"><a href="#info5" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox5" data-toggle="tab">在线测试</a></li>
<li><a href="#sample5" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab6">
<li class="active"><a href="#info6" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox6" data-toggle="tab">在线测试</a></li>
<li><a href="#sample6" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info5">
<div class="tab-pane active" id="info6">
<div class="well">
发送验证码 </div>
<div class="panel panel-default">
... ... @@ -824,13 +952,13 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox5">
<div class="tab-pane" id="sandbox6">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/sms/send" method="get" name="form5" id="form5">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/sms/send" method="get" name="form6" id="form6">
<div class="form-group">
<label class="control-label" for="mobile">mobile</label>
<input type="string" class="form-control input-sm" id="mobile" required placeholder="手机号" name="mobile">
... ... @@ -840,8 +968,8 @@
<input type="string" class="form-control input-sm" id="event" required placeholder="事件名称" name="event">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="5">提交</button>
<button type="reset" class="btn btn-info" rel="5">重置</button>
<button type="submit" class="btn btn-success send" rel="6">提交</button>
<button type="reset" class="btn btn-info" rel="6">重置</button>
</div>
</form>
</div>
... ... @@ -851,8 +979,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers5"></pre>
<pre id="response5"></pre>
<pre id="response_headers6"></pre>
<pre id="response6"></pre>
</div>
</div>
</div>
... ... @@ -867,10 +995,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample5">
<div class="tab-pane" id="sample6">
<div class="row">
<div class="col-md-12">
<pre id="sample_response5"></pre>
<pre id="sample_response6"></pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -880,26 +1008,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-6">
<div class="panel-heading" id="heading-7">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion6" href="#collapseOne6"> 检测验证码 <span class="text-muted">/api/sms/check</span></a>
<a data-toggle="collapse" data-parent="#accordion7" href="#collapseOne7"> 检测验证码 <span class="text-muted">/api/sms/check</span></a>
</h4>
</div>
<div id="collapseOne6" class="panel-collapse collapse">
<div id="collapseOne7" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab6">
<li class="active"><a href="#info6" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox6" data-toggle="tab">在线测试</a></li>
<li><a href="#sample6" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab7">
<li class="active"><a href="#info7" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox7" data-toggle="tab">在线测试</a></li>
<li><a href="#sample7" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info6">
<div class="tab-pane active" id="info7">
<div class="well">
检测验证码 </div>
<div class="panel panel-default">
... ... @@ -950,13 +1078,13 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox6">
<div class="tab-pane" id="sandbox7">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/sms/check" method="get" name="form6" id="form6">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/sms/check" method="get" name="form7" id="form7">
<div class="form-group">
<label class="control-label" for="mobile">mobile</label>
<input type="string" class="form-control input-sm" id="mobile" required placeholder="手机号" name="mobile">
... ... @@ -970,8 +1098,8 @@
<input type="string" class="form-control input-sm" id="captcha" required placeholder="验证码" name="captcha">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="6">提交</button>
<button type="reset" class="btn btn-info" rel="6">重置</button>
<button type="submit" class="btn btn-success send" rel="7">提交</button>
<button type="reset" class="btn btn-info" rel="7">重置</button>
</div>
</form>
</div>
... ... @@ -981,8 +1109,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers6"></pre>
<pre id="response6"></pre>
<pre id="response_headers7"></pre>
<pre id="response7"></pre>
</div>
</div>
</div>
... ... @@ -997,10 +1125,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample6">
<div class="tab-pane" id="sample7">
<div class="row">
<div class="col-md-12">
<pre id="sample_response6"></pre>
<pre id="sample_response7"></pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -1012,26 +1140,26 @@
<h2>登录接口</h2>
<hr>
<div class="panel panel-default">
<div class="panel-heading" id="heading-7">
<div class="panel-heading" id="heading-8">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion7" href="#collapseOne7"> 获取sessionKey和openid <span class="text-muted">/api/user/getSessionKey</span></a>
<a data-toggle="collapse" data-parent="#accordion8" href="#collapseOne8"> 获取sessionKey和openid <span class="text-muted">/api/user/getSessionKey</span></a>
</h4>
</div>
<div id="collapseOne7" class="panel-collapse collapse">
<div id="collapseOne8" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab7">
<li class="active"><a href="#info7" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox7" data-toggle="tab">在线测试</a></li>
<li><a href="#sample7" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab8">
<li class="active"><a href="#info8" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox8" data-toggle="tab">在线测试</a></li>
<li><a href="#sample8" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info7">
<div class="tab-pane active" id="info8">
<div class="well">
获取sessionKey和openid </div>
<div class="panel panel-default">
... ... @@ -1070,20 +1198,20 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox7">
<div class="tab-pane" id="sandbox8">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/getSessionKey" method="POST" name="form7" id="form7">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/getSessionKey" method="POST" name="form8" id="form8">
<div class="form-group">
<label class="control-label" for="code">code</label>
<input type="string" class="form-control input-sm" id="code" required placeholder="小程序code" name="code">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="7">提交</button>
<button type="reset" class="btn btn-info" rel="7">重置</button>
<button type="submit" class="btn btn-success send" rel="8">提交</button>
<button type="reset" class="btn btn-info" rel="8">重置</button>
</div>
</form>
</div>
... ... @@ -1093,8 +1221,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers7"></pre>
<pre id="response7"></pre>
<pre id="response_headers8"></pre>
<pre id="response8"></pre>
</div>
</div>
</div>
... ... @@ -1109,10 +1237,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample7">
<div class="tab-pane" id="sample8">
<div class="row">
<div class="col-md-12">
<pre id="sample_response7">{
<pre id="sample_response8">{
"code": 1,
"msg": "获取成功",
"time": "1553839125",
... ... @@ -1130,26 +1258,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-8">
<div class="panel-heading" id="heading-9">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion8" href="#collapseOne8"> <span class="text-muted">/api/user/http_get</span></a>
<a data-toggle="collapse" data-parent="#accordion9" href="#collapseOne9"> <span class="text-muted">/api/user/http_get</span></a>
</h4>
</div>
<div id="collapseOne8" class="panel-collapse collapse">
<div id="collapseOne9" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab8">
<li class="active"><a href="#info8" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox8" data-toggle="tab">在线测试</a></li>
<li><a href="#sample8" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab9">
<li class="active"><a href="#info9" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox9" data-toggle="tab">在线测试</a></li>
<li><a href="#sample9" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info8">
<div class="tab-pane active" id="info9">
<div class="well">
</div>
<div class="panel panel-default">
... ... @@ -1171,19 +1299,19 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox8">
<div class="tab-pane" id="sandbox9">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/http_get" method="get" name="form8" id="form8">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/http_get" method="get" name="form9" id="form9">
<div class="form-group">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="8">提交</button>
<button type="reset" class="btn btn-info" rel="8">重置</button>
<button type="submit" class="btn btn-success send" rel="9">提交</button>
<button type="reset" class="btn btn-info" rel="9">重置</button>
</div>
</form>
</div>
... ... @@ -1193,8 +1321,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers8"></pre>
<pre id="response8"></pre>
<pre id="response_headers9"></pre>
<pre id="response9"></pre>
</div>
</div>
</div>
... ... @@ -1209,10 +1337,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample8">
<div class="tab-pane" id="sample9">
<div class="row">
<div class="col-md-12">
<pre id="sample_response8"></pre>
<pre id="sample_response9"></pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -1222,26 +1350,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-9">
<div class="panel-heading" id="heading-10">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion9" href="#collapseOne9"> 小程序登录注册 <span class="text-muted">/api/user/login</span></a>
<a data-toggle="collapse" data-parent="#accordion10" href="#collapseOne10"> 小程序登录注册 <span class="text-muted">/api/user/login</span></a>
</h4>
</div>
<div id="collapseOne9" class="panel-collapse collapse">
<div id="collapseOne10" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab9">
<li class="active"><a href="#info9" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox9" data-toggle="tab">在线测试</a></li>
<li><a href="#sample9" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab10">
<li class="active"><a href="#info10" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox10" data-toggle="tab">在线测试</a></li>
<li><a href="#sample10" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info9">
<div class="tab-pane active" id="info10">
<div class="well">
小程序登录注册 </div>
<div class="panel panel-default">
... ... @@ -1298,13 +1426,13 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox9">
<div class="tab-pane" id="sandbox10">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/login" method="POST" name="form9" id="form9">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/login" method="POST" name="form10" id="form10">
<div class="form-group">
<label class="control-label" for="openid">openid</label>
<input type="string" class="form-control input-sm" id="openid" required placeholder="openid" name="openid">
... ... @@ -1322,8 +1450,8 @@
<input type="string" class="form-control input-sm" id="iv" required placeholder="iv" name="iv">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="9">提交</button>
<button type="reset" class="btn btn-info" rel="9">重置</button>
<button type="submit" class="btn btn-success send" rel="10">提交</button>
<button type="reset" class="btn btn-info" rel="10">重置</button>
</div>
</form>
</div>
... ... @@ -1333,8 +1461,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers9"></pre>
<pre id="response9"></pre>
<pre id="response_headers10"></pre>
<pre id="response10"></pre>
</div>
</div>
</div>
... ... @@ -1349,10 +1477,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample9">
<div class="tab-pane" id="sample10">
<div class="row">
<div class="col-md-12">
<pre id="sample_response9">{
<pre id="sample_response10">{
"code": 1,
"msg": "登陆成功",
"time": "1553839125",
... ... @@ -1369,26 +1497,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-10">
<div class="panel-heading" id="heading-11">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion10" href="#collapseOne10"> 通过code获取token <span class="text-muted">/api/user/getToken</span></a>
<a data-toggle="collapse" data-parent="#accordion11" href="#collapseOne11"> 通过code获取token <span class="text-muted">/api/user/getToken</span></a>
</h4>
</div>
<div id="collapseOne10" class="panel-collapse collapse">
<div id="collapseOne11" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab10">
<li class="active"><a href="#info10" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox10" data-toggle="tab">在线测试</a></li>
<li><a href="#sample10" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab11">
<li class="active"><a href="#info11" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox11" data-toggle="tab">在线测试</a></li>
<li><a href="#sample11" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info10">
<div class="tab-pane active" id="info11">
<div class="well">
通过code获取token </div>
<div class="panel panel-default">
... ... @@ -1427,20 +1555,20 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox10">
<div class="tab-pane" id="sandbox11">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/getToken" method="POST" name="form10" id="form10">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/getToken" method="POST" name="form11" id="form11">
<div class="form-group">
<label class="control-label" for="code">code</label>
<input type="string" class="form-control input-sm" id="code" required placeholder="code" name="code">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="10">提交</button>
<button type="reset" class="btn btn-info" rel="10">重置</button>
<button type="submit" class="btn btn-success send" rel="11">提交</button>
<button type="reset" class="btn btn-info" rel="11">重置</button>
</div>
</form>
</div>
... ... @@ -1450,8 +1578,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers10"></pre>
<pre id="response10"></pre>
<pre id="response_headers11"></pre>
<pre id="response11"></pre>
</div>
</div>
</div>
... ... @@ -1466,10 +1594,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample10">
<div class="tab-pane" id="sample11">
<div class="row">
<div class="col-md-12">
<pre id="sample_response10">{
<pre id="sample_response11">{
"code": 1,
"msg": "SUCCESS",
"time": "1553839125",
... ... @@ -1486,26 +1614,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-11">
<div class="panel-heading" id="heading-12">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion11" href="#collapseOne11"> <span class="text-muted">/api/user/member</span></a>
<a data-toggle="collapse" data-parent="#accordion12" href="#collapseOne12"> <span class="text-muted">/api/user/member</span></a>
</h4>
</div>
<div id="collapseOne11" class="panel-collapse collapse">
<div id="collapseOne12" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab11">
<li class="active"><a href="#info11" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox11" data-toggle="tab">在线测试</a></li>
<li><a href="#sample11" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab12">
<li class="active"><a href="#info12" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox12" data-toggle="tab">在线测试</a></li>
<li><a href="#sample12" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info11">
<div class="tab-pane active" id="info12">
<div class="well">
</div>
<div class="panel panel-default">
... ... @@ -1527,19 +1655,19 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox11">
<div class="tab-pane" id="sandbox12">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/member" method="get" name="form11" id="form11">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/member" method="get" name="form12" id="form12">
<div class="form-group">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="11">提交</button>
<button type="reset" class="btn btn-info" rel="11">重置</button>
<button type="submit" class="btn btn-success send" rel="12">提交</button>
<button type="reset" class="btn btn-info" rel="12">重置</button>
</div>
</form>
</div>
... ... @@ -1549,8 +1677,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers11"></pre>
<pre id="response11"></pre>
<pre id="response_headers12"></pre>
<pre id="response12"></pre>
</div>
</div>
</div>
... ... @@ -1565,10 +1693,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample11">
<div class="tab-pane" id="sample12">
<div class="row">
<div class="col-md-12">
<pre id="sample_response11"></pre>
<pre id="sample_response12"></pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -1583,7 +1711,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-01-09 13:44:09 </div>
Generated on 2020-01-09 13:57:39 </div>
<div class="col-md-6" align="right">
<a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
</div>
... ...
... ... @@ -2,6 +2,6 @@
// autoload.php @generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php';
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitc2b0bef56335094f4a90d4285e30c29f::getLoader();
... ...
... ... @@ -55,6 +55,7 @@ class ClassLoader
private $classMap = array();
private $classMapAuthoritative = false;
private $missingClasses = array();
private $apcuPrefix;
public function getPrefixes()
{
... ... @@ -272,6 +273,26 @@ class ClassLoader
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
... ... @@ -313,11 +334,6 @@ class ClassLoader
*/
public function findFile($class)
{
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
if ('\\' == $class[0]) {
$class = substr($class, 1);
}
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
... ... @@ -325,6 +341,12 @@ class ClassLoader
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
... ... @@ -333,6 +355,10 @@ class ClassLoader
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
... ... @@ -348,10 +374,14 @@ class ClassLoader
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
if (0 === strpos($class, $prefix)) {
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
... ...
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
... ...
... ... @@ -12,22 +12,6 @@ return array(
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'9d8e013a5160a09477beb8e44f8ae97b' => $vendorDir . '/markbaker/matrix/classes/src/functions/adjoint.php',
'6e78d1bdea6248d6aa117229efae50f2' => $vendorDir . '/markbaker/matrix/classes/src/functions/antidiagonal.php',
'4623d87924d94f5412fe5afbf1cef31d' => $vendorDir . '/markbaker/matrix/classes/src/functions/cofactors.php',
'901fd1f6950a637ca85f66b701a45e13' => $vendorDir . '/markbaker/matrix/classes/src/functions/determinant.php',
'83057abc0e4acc99ba80154ee5d02a49' => $vendorDir . '/markbaker/matrix/classes/src/functions/diagonal.php',
'07b7fd7a434451149b4fd477fca0ce06' => $vendorDir . '/markbaker/matrix/classes/src/functions/identity.php',
'c8d43b340583e07ae89f2a3baef2cf89' => $vendorDir . '/markbaker/matrix/classes/src/functions/inverse.php',
'499bb10ed7a3aee2ba4c09a31a85e8d1' => $vendorDir . '/markbaker/matrix/classes/src/functions/minors.php',
'1cad2e6414d652e8b1c64e8967f6f37d' => $vendorDir . '/markbaker/matrix/classes/src/functions/trace.php',
'95a7f134ac17161d07def442b3b737e8' => $vendorDir . '/markbaker/matrix/classes/src/functions/transpose.php',
'b3a6bc628377118d4b4b8ba08d1eb949' => $vendorDir . '/markbaker/matrix/classes/src/operations/add.php',
'5fef6d0e407f3f8887266dfa4a6c534c' => $vendorDir . '/markbaker/matrix/classes/src/operations/directsum.php',
'684ba247e1385946e3babdaa054119de' => $vendorDir . '/markbaker/matrix/classes/src/operations/subtract.php',
'aa53dcba601214d17ad405b7c291b7e8' => $vendorDir . '/markbaker/matrix/classes/src/operations/multiply.php',
'75c79eb1b25749b05a47976f32b0d8a2' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideby.php',
'6ab8ad87a734f276a6bcd5a0fe1289be' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideinto.php',
'abede361264e2ae69ec1eee813a101af' => $vendorDir . '/markbaker/complex/classes/src/functions/abs.php',
'21a5860fbef5be28db5ddfbc3cca67c4' => $vendorDir . '/markbaker/complex/classes/src/functions/acos.php',
'1546e3f9d127f2a9bb2d1b6c31c26ef1' => $vendorDir . '/markbaker/complex/classes/src/functions/acosh.php',
... ... @@ -70,7 +54,24 @@ return array(
'883af48563631547925fa4c3b48ead07' => $vendorDir . '/markbaker/complex/classes/src/operations/multiply.php',
'f190e3308e6ca23234a2875edc985c03' => $vendorDir . '/markbaker/complex/classes/src/operations/divideby.php',
'ac9e33ce6841aa5bf5d16d465a2f03a7' => $vendorDir . '/markbaker/complex/classes/src/operations/divideinto.php',
'9d8e013a5160a09477beb8e44f8ae97b' => $vendorDir . '/markbaker/matrix/classes/src/functions/adjoint.php',
'6e78d1bdea6248d6aa117229efae50f2' => $vendorDir . '/markbaker/matrix/classes/src/functions/antidiagonal.php',
'4623d87924d94f5412fe5afbf1cef31d' => $vendorDir . '/markbaker/matrix/classes/src/functions/cofactors.php',
'901fd1f6950a637ca85f66b701a45e13' => $vendorDir . '/markbaker/matrix/classes/src/functions/determinant.php',
'83057abc0e4acc99ba80154ee5d02a49' => $vendorDir . '/markbaker/matrix/classes/src/functions/diagonal.php',
'07b7fd7a434451149b4fd477fca0ce06' => $vendorDir . '/markbaker/matrix/classes/src/functions/identity.php',
'c8d43b340583e07ae89f2a3baef2cf89' => $vendorDir . '/markbaker/matrix/classes/src/functions/inverse.php',
'499bb10ed7a3aee2ba4c09a31a85e8d1' => $vendorDir . '/markbaker/matrix/classes/src/functions/minors.php',
'1cad2e6414d652e8b1c64e8967f6f37d' => $vendorDir . '/markbaker/matrix/classes/src/functions/trace.php',
'95a7f134ac17161d07def442b3b737e8' => $vendorDir . '/markbaker/matrix/classes/src/functions/transpose.php',
'b3a6bc628377118d4b4b8ba08d1eb949' => $vendorDir . '/markbaker/matrix/classes/src/operations/add.php',
'5fef6d0e407f3f8887266dfa4a6c534c' => $vendorDir . '/markbaker/matrix/classes/src/operations/directsum.php',
'684ba247e1385946e3babdaa054119de' => $vendorDir . '/markbaker/matrix/classes/src/operations/subtract.php',
'aa53dcba601214d17ad405b7c291b7e8' => $vendorDir . '/markbaker/matrix/classes/src/operations/multiply.php',
'75c79eb1b25749b05a47976f32b0d8a2' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideby.php',
'6ab8ad87a734f276a6bcd5a0fe1289be' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideinto.php',
'488987c28e9b5e95a1ce6b6bcb94606c' => $vendorDir . '/karsonzhang/fastadmin-addons/src/common.php',
'9e090711773bfc38738f5dbaee5a7f14' => $vendorDir . '/overtrue/wechat/src/Payment/helpers.php',
'841780ea2e1d6545ea3a253239d59c05' => $vendorDir . '/qiniu/php-sdk/src/Qiniu/functions.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
'488987c28e9b5e95a1ce6b6bcb94606c' => $vendorDir . '/karsonzhang/fastadmin-addons/src/common.php',
);
... ...
... ... @@ -8,12 +8,13 @@ $baseDir = dirname($vendorDir);
return array(
'think\\composer\\' => array($vendorDir . '/topthink/think-installer/src'),
'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'),
'think\\' => array($baseDir . '/thinkphp/library/think', $vendorDir . '/karsonzhang/fastadmin-addons/src'),
'think\\' => array($vendorDir . '/karsonzhang/fastadmin-addons/src', $baseDir . '/thinkphp/library/think'),
'Symfony\\Polyfill\\Php70\\' => array($vendorDir . '/symfony/polyfill-php70'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'),
'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'),
'Symfony\\Bridge\\PsrHttpMessage\\' => array($vendorDir . '/symfony/psr-http-message-bridge'),
'Qiniu\\' => array($vendorDir . '/qiniu/php-sdk/src/Qiniu'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
... ...
... ... @@ -23,7 +23,7 @@ class ComposerAutoloaderInitc2b0bef56335094f4a90d4285e30c29f
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitc2b0bef56335094f4a90d4285e30c29f', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
... ...
... ... @@ -13,22 +13,6 @@ class ComposerStaticInitc2b0bef56335094f4a90d4285e30c29f
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'9d8e013a5160a09477beb8e44f8ae97b' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/adjoint.php',
'6e78d1bdea6248d6aa117229efae50f2' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/antidiagonal.php',
'4623d87924d94f5412fe5afbf1cef31d' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/cofactors.php',
'901fd1f6950a637ca85f66b701a45e13' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/determinant.php',
'83057abc0e4acc99ba80154ee5d02a49' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/diagonal.php',
'07b7fd7a434451149b4fd477fca0ce06' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/identity.php',
'c8d43b340583e07ae89f2a3baef2cf89' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/inverse.php',
'499bb10ed7a3aee2ba4c09a31a85e8d1' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/minors.php',
'1cad2e6414d652e8b1c64e8967f6f37d' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/trace.php',
'95a7f134ac17161d07def442b3b737e8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/transpose.php',
'b3a6bc628377118d4b4b8ba08d1eb949' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/add.php',
'5fef6d0e407f3f8887266dfa4a6c534c' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/directsum.php',
'684ba247e1385946e3babdaa054119de' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/subtract.php',
'aa53dcba601214d17ad405b7c291b7e8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/multiply.php',
'75c79eb1b25749b05a47976f32b0d8a2' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideby.php',
'6ab8ad87a734f276a6bcd5a0fe1289be' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideinto.php',
'abede361264e2ae69ec1eee813a101af' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/abs.php',
'21a5860fbef5be28db5ddfbc3cca67c4' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acos.php',
'1546e3f9d127f2a9bb2d1b6c31c26ef1' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acosh.php',
... ... @@ -71,9 +55,26 @@ class ComposerStaticInitc2b0bef56335094f4a90d4285e30c29f
'883af48563631547925fa4c3b48ead07' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/multiply.php',
'f190e3308e6ca23234a2875edc985c03' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/divideby.php',
'ac9e33ce6841aa5bf5d16d465a2f03a7' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/divideinto.php',
'9d8e013a5160a09477beb8e44f8ae97b' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/adjoint.php',
'6e78d1bdea6248d6aa117229efae50f2' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/antidiagonal.php',
'4623d87924d94f5412fe5afbf1cef31d' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/cofactors.php',
'901fd1f6950a637ca85f66b701a45e13' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/determinant.php',
'83057abc0e4acc99ba80154ee5d02a49' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/diagonal.php',
'07b7fd7a434451149b4fd477fca0ce06' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/identity.php',
'c8d43b340583e07ae89f2a3baef2cf89' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/inverse.php',
'499bb10ed7a3aee2ba4c09a31a85e8d1' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/minors.php',
'1cad2e6414d652e8b1c64e8967f6f37d' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/trace.php',
'95a7f134ac17161d07def442b3b737e8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/transpose.php',
'b3a6bc628377118d4b4b8ba08d1eb949' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/add.php',
'5fef6d0e407f3f8887266dfa4a6c534c' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/directsum.php',
'684ba247e1385946e3babdaa054119de' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/subtract.php',
'aa53dcba601214d17ad405b7c291b7e8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/multiply.php',
'75c79eb1b25749b05a47976f32b0d8a2' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideby.php',
'6ab8ad87a734f276a6bcd5a0fe1289be' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideinto.php',
'488987c28e9b5e95a1ce6b6bcb94606c' => __DIR__ . '/..' . '/karsonzhang/fastadmin-addons/src/common.php',
'9e090711773bfc38738f5dbaee5a7f14' => __DIR__ . '/..' . '/overtrue/wechat/src/Payment/helpers.php',
'841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
'488987c28e9b5e95a1ce6b6bcb94606c' => __DIR__ . '/..' . '/karsonzhang/fastadmin-addons/src/common.php',
);
public static $prefixLengthsPsr4 = array (
... ... @@ -91,6 +92,10 @@ class ComposerStaticInitc2b0bef56335094f4a90d4285e30c29f
'Symfony\\Component\\HttpFoundation\\' => 33,
'Symfony\\Bridge\\PsrHttpMessage\\' => 30,
),
'Q' =>
array (
'Qiniu\\' => 6,
),
'P' =>
array (
'Psr\\SimpleCache\\' => 16,
... ... @@ -138,8 +143,8 @@ class ComposerStaticInitc2b0bef56335094f4a90d4285e30c29f
),
'think\\' =>
array (
0 => __DIR__ . '/../..' . '/thinkphp/library/think',
1 => __DIR__ . '/..' . '/karsonzhang/fastadmin-addons/src',
0 => __DIR__ . '/..' . '/karsonzhang/fastadmin-addons/src',
1 => __DIR__ . '/../..' . '/thinkphp/library/think',
),
'Symfony\\Polyfill\\Php70\\' =>
array (
... ... @@ -161,6 +166,10 @@ class ComposerStaticInitc2b0bef56335094f4a90d4285e30c29f
array (
0 => __DIR__ . '/..' . '/symfony/psr-http-message-bridge',
),
'Qiniu\\' =>
array (
0 => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu',
),
'Psr\\SimpleCache\\' =>
array (
0 => __DIR__ . '/..' . '/psr/simple-cache/src',
... ...