commit 63dbaa16c887cd16572ad419dd8dccc42e30d7c0 Author: JULM-COMPUTER Date: Fri Apr 18 00:39:21 2025 +0800 初始化 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..91d1e98 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/.idea +/.vscode +/runtime +*.log +.env \ No newline at end of file diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..e69de29 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..36f7b6f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,42 @@ +sudo: false + +language: php + +branches: + only: + - stable + +cache: + directories: + - $HOME/.composer/cache + +before_install: + - composer self-update + +install: + - composer install --no-dev --no-interaction --ignore-platform-reqs + - zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Core.zip . + - composer require --update-no-dev --no-interaction "topthink/think-image:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-migration:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-captcha:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-mongo:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-worker:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-helper:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-queue:^1.0" + - composer require --update-no-dev --no-interaction "topthink/think-angular:^1.0" + - composer require --dev --update-no-dev --no-interaction "topthink/think-testing:^1.0" + - zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Full.zip . + +script: + - php think unit + +deploy: + provider: releases + api_key: + secure: TSF6bnl2JYN72UQOORAJYL+CqIryP2gHVKt6grfveQ7d9rleAEoxlq6PWxbvTI4jZ5nrPpUcBUpWIJHNgVcs+bzLFtyh5THaLqm39uCgBbrW7M8rI26L8sBh/6nsdtGgdeQrO/cLu31QoTzbwuz1WfAVoCdCkOSZeXyT/CclH99qV6RYyQYqaD2wpRjrhA5O4fSsEkiPVuk0GaOogFlrQHx+C+lHnf6pa1KxEoN1A0UxxVfGX6K4y5g4WQDO5zT4bLeubkWOXK0G51XSvACDOZVIyLdjApaOFTwamPcD3S1tfvuxRWWvsCD5ljFvb2kSmx5BIBNwN80MzuBmrGIC27XLGOxyMerwKxB6DskNUO9PflKHDPI61DRq0FTy1fv70SFMSiAtUv9aJRT41NQh9iJJ0vC8dl+xcxrWIjU1GG6+l/ZcRqVx9V1VuGQsLKndGhja7SQ+X1slHl76fRq223sMOql7MFCd0vvvxVQ2V39CcFKao/LB1aPH3VhODDEyxwx6aXoTznvC/QPepgWsHOWQzKj9ftsgDbsNiyFlXL4cu8DWUty6rQy8zT2b4O8b1xjcwSUCsy+auEjBamzQkMJFNlZAIUrukL/NbUhQU37TAbwsFyz7X0E/u/VMle/nBCNAzgkMwAUjiHM6FqrKKBRWFbPrSIixjfjkCnrMEPw= + file: + - ThinkPHP_Core.zip + - ThinkPHP_Full.zip + skip_cleanup: true + on: + tags: true diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..574a39c --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,32 @@ + +ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 +版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn) +All rights reserved。 +ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 + +Apache Licence是著名的非盈利开源组织Apache采用的协议。 +该协议和BSD类似,鼓励代码共享和尊重原作者的著作权, +允许代码修改,再作为开源或商业软件发布。需要满足 +的条件: +1. 需要给代码的用户一份Apache Licence ; +2. 如果你修改了代码,需要在被修改的文件中说明; +3. 在延伸的代码中(修改和有源代码衍生的代码中)需要 +带有原来代码中的协议,商标,专利声明和其他原来作者规 +定需要包含的说明; +4. 如果再发布的产品中包含一个Notice文件,则在Notice文 +件中需要带有本协议内容。你可以在Notice中增加自己的 +许可,但不可以表现为对Apache Licence构成更改。 +具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0 + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..a8c4d1c --- /dev/null +++ b/README.md @@ -0,0 +1,56 @@ +ThinkPHP 6.0 +=============== + +> 运行环境要求PHP7.2+,兼容PHP8.1 + +[官方应用服务市场](https://market.topthink.com) | [`ThinkAPI`——官方统一API服务](https://docs.topthink.com/think-api) + +ThinkPHPV6.0版本由[亿速云](https://www.yisu.com/)独家赞助发布。 + +## 主要新特性 + +* 采用`PHP7`强类型(严格模式) +* 支持更多的`PSR`规范 +* 原生多应用支持 +* 更强大和易用的查询 +* 全新的事件系统 +* 模型事件和数据库事件统一纳入事件系统 +* 模板引擎分离出核心 +* 内部功能中间件化 +* SESSION/Cookie机制改进 +* 对Swoole以及协程支持改进 +* 对IDE更加友好 +* 统一和精简大量用法 + +## 安装 + +~~~ +composer create-project topthink/think tp 6.0.* +~~~ + +如果需要更新框架使用 +~~~ +composer update topthink/framework +~~~ + +## 文档 + +[完全开发手册](https://www.kancloud.cn/manual/thinkphp6_0/content) + +## 参与开发 + +请参阅 [ThinkPHP 核心框架包](https://github.com/top-think/framework)。 + +## 版权信息 + +ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 + +本项目包含的第三方源码和二进制文件之版权信息另行标注。 + +版权所有Copyright © 2006-2021 by ThinkPHP (http://thinkphp.cn) + +All rights reserved。 + +ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 + +更多细节参阅 [LICENSE.txt](LICENSE.txt) diff --git a/app/.htaccess b/app/.htaccess new file mode 100644 index 0000000..3418e55 --- /dev/null +++ b/app/.htaccess @@ -0,0 +1 @@ +deny from all \ No newline at end of file diff --git a/app/AppService.php b/app/AppService.php new file mode 100644 index 0000000..96556e8 --- /dev/null +++ b/app/AppService.php @@ -0,0 +1,22 @@ +app = $app; + $this->request = $this->app->request; + + // 控制器初始化 + $this->initialize(); + } + + // 初始化 + protected function initialize() + {} + + /** + * 验证数据 + * @access protected + * @param array $data 数据 + * @param string|array $validate 验证器名或者验证规则数组 + * @param array $message 提示信息 + * @param bool $batch 是否批量验证 + * @return array|string|true + * @throws ValidateException + */ + protected function validate(array $data, $validate, array $message = [], bool $batch = false) + { + if (is_array($validate)) { + $v = new Validate(); + $v->rule($validate); + } else { + if (strpos($validate, '.')) { + // 支持场景 + [$validate, $scene] = explode('.', $validate); + } + $class = false !== strpos($validate, '\\') ? $validate : $this->app->parseClass('validate', $validate); + $v = new $class(); + if (!empty($scene)) { + $v->scene($scene); + } + } + + $v->message($message); + + // 是否批量验证 + if ($batch || $this->batchValidate) { + $v->batch(true); + } + + return $v->failException(true)->check($data); + } + +} diff --git a/app/ExceptionHandle.php b/app/ExceptionHandle.php new file mode 100644 index 0000000..453d126 --- /dev/null +++ b/app/ExceptionHandle.php @@ -0,0 +1,58 @@ +setName('course') + ->setDescription('the course command'); + } + protected function execute(Input $input, Output $output) + { + $this->aria2 = new Aria2('http://127.0.0.1:16800/jsonrpc','11223344'); + $this->completed = false; + while($this->completed === false){ + try { + $this->start(); + } catch (\Exception $e) { + dump($e); + sleep(3); + } + } + dump('下载完成!'); + // 指令输出 + // $output->writeln('course'); + } + private function start() + { + // $savepath = store_path() . '/lebolebo/'; + $savepath = 'E:/lebolebo/'; + $account = new Account(); + $account_info = $account->login('13880615958','robo520'); + if($account_info['code'] == 500){ + dump($account_info['msg']); + exit; + } + $curl = new Curl(); + $curr = new Curriculum(); + $curr->setHeader('token',$account_info['data']['token']); + $course = $curr->list(0); + + foreach ($course['data']['list'] as $list){ + $c = $savepath . $list['courseName']; + is_dir($c) || mkdir($c,0755,true); + $detail = $curr->detail($list['id']); + $courseCover = $c . '/courseCover.png'; + if($detail['data']['courseCover']){ + $downloadurl = $detail['data']['courseCover']; + $check = $this->checkfile($downloadurl,$courseCover); + if(!$check && !is_file($courseCover)){ + // $result = $curl->_fastDownload($downloadurl,$courseCover); + $this->aria2->addUri( + [$downloadurl], + ['dir'=>$c, + 'out'=>'courseCover.png' + ] + ); + // dump('封面下载结果:',$result); + // if($result){ + // $this->complete($downloadurl,$courseCover); + // } + } + $txt = $courseCover . '-下载地址.txt'; + $this->savetxt($txt,$downloadurl); + } + $d = $curr->courseUnitList($list['courseCode']); + $courseUnits = $d['data']['courseUnit']; + if($courseUnits === null){ + continue; + } + foreach ($courseUnits as $courseUnit){ + $courseUnitName = $c . '/' . str_ireplace('/','-',$courseUnit['courseUnitName']); + if(!is_dir($courseUnitName)){ + dump('创建课程文件夹:' . $courseUnitName); + mkdir($courseUnitName,0755,true); + } + $selectByCourseUnits = $curr->selectByCourseUnits($courseUnit['courseCode'],$courseUnit['courseUnitCode']); + foreach ($selectByCourseUnits['data'] as $selectByCourseUnit){ + $this->waiting(); + $sessionName = $courseUnitName . '/' . $selectByCourseUnit['sessionName']; + if(!is_dir($sessionName)){ + dump('创建课件文件夹:'.$sessionName); + mkdir($sessionName,0755,true); + } + $t = $curr->selectByCourseSessionCode($selectByCourseUnit['courseSessionCode']); + // 0: {type: 1, des: "PPT-HTML"} + // 1: {type: 2, des: "讲义"} + // 2: {type: 3, des: "课前预习"} + // 3: {type: 4, des: "测一测"} + // 4: {type: 5, des: "玩一玩"} + // 5: {type: 6, des: "试一试"} + // 6: {type: 9, des: "知识点"} + // 7: {type: 10, des: "名人名言"} + // 8: {type: 11, des: "录播课"} + // 9: {type: 13, des: "教辅"} + // 10: {type: 14, des: "备课"} + // 11: {type: 15, des: "课程内容"} + // 12: {type: 16, des: "课后拓展"} + // 13: {type: 18, des: "素养目标"} + $ts = $t['data']; + foreach ($ts as $kk ){ + switch ($kk['resourceType']) { + case '1':// PPT-HTML + if(!isset($kk['content'])){ + continue; + } + $filename = $kk['content']['fileName']; + $downloadurl = $kk['content']['fileUrl']; + $file = $sessionName . '/' . $filename; + // 保存下载地址 + $txt = "{$file}-下载地址.txt"; + $this->savetxt($txt,$downloadurl); + $check = $this->checkfile($downloadurl,$file); + if(!$check && !is_file($file)){ + dump('下载PPT:' . $file); + // $result = $curl->_fastDownload($downloadurl,$file); + // dump('PPT下载结果:',$result); + // if($result){ + // $this->complete($downloadurl,$file); + // } + $this->aria2->addUri( + [$downloadurl], + ['dir'=>$sessionName, + 'out'=>$filename] + ); + }else if($check && !is_file($file)){ + if(is_file($check)){ + try { + copy($check,$file); + } catch (Exception $e) { + dump('文件拷贝失败:',$e); + exit; + } + }else{ + dump('下载PPT:' . $file); + // $result = $curl->_fastDownload($downloadurl,$file); + // dump('PPT下载结果:',$result); + // if($result){ + // $this->complete($downloadurl,$file); + // } + $this->aria2->addUri( + [$downloadurl], + ['dir'=>$sessionName, + 'out'=>$filename] + ); + } + + dump('跳过PPT:' . $file); + }else{ + dump('PPT文件已存在:' . $file); + $this->complete($downloadurl,$file); + } + break; + case '2': + break; + case '3': + break; + case '4': + break; + case '5': + break; + case '6': + // 试一试 + $shiyishi = $sessionName . '/试一试/'; + if(!is_dir($shiyishi)){ + mkdir($shiyishi,0755,true); + } + $questions = $kk['content']['questions']; + if(!is_array($questions))break; + foreach ($questions as $key => $question) { + $filename = $question['fileName']; + $downloadurl = $question['fileUrl']; + $file = $shiyishi . $filename; + // 保存文件下载地址 + $txt = "{$file}-下载地址.txt"; + $this->savetxt($txt,$downloadurl); + $check = $this->checkfile($downloadurl,$file); + if(!$check && !is_file($file)){ + // $result = $curl->_fastDownload($downloadurl,$file); + // dump('试一试下载结果:',$result); + // if($result){ + // $this->complete($downloadurl,$file); + // } + $this->aria2->addUri( + [$downloadurl], + ['dir'=>$shiyishi, + 'out'=>$filename] + ); + }else if($check && !is_file($file)){ + copy($check,$file); + dump('跳过试一试:' . $file); + }else{ + dump('试一试文件已存在:' . $file); + $this->complete($downloadurl,$file); + } + } + break; + case '9': + break; + case '10': + break; + case '11': + break; + case '13': + // 教辅 + if(!isset($kk['content']['resourceList'])){ + continue; + } + $jiaofupath = $sessionName . '/教辅/'; + if(!is_dir($jiaofupath)){ + mkdir($jiaofupath,0755,true); + } + $resourceLists = $kk['content']['resourceList']; + foreach($resourceLists as $resourceList){ + $file = $jiaofupath . $resourceList['fileName'] ; + if(Str::endsWith($file,['.mp4','.mov'])){ + $dd = $curr->getVideoUrl($resourceList['fileUrl']); + $downloadurl = $dd['data']; + }else{ + $downloadurl = $resourceList['fileUrl']; + } + // 保存下载地址 + $txt = "{$file}-下载地址.txt"; + $this->savetxt($txt,$downloadurl); + $check = $this->checkfile($downloadurl,$file); + if(!$check && !is_file($file)){ + dump('下载教辅:' . $file); + // $result = $curl->_fastDownload($downloadurl,$file); + // dump('教辅下载结果:',$result); + // if($result){ + // $this->complete($downloadurl,$file); + // } + $this->aria2->addUri( + [$downloadurl], + ['dir'=>$jiaofupath, + 'out'=>$resourceList['fileName']] + ); + }else if($check && !is_file($file)){ + copy($check,$file); + dump('跳过教辅:' . $file); + }else{ + dump('教辅文件已存在:' . $file); + $this->complete($downloadurl,$file); + } + } + break; + case '14': + // 备课 + if(!isset($kk['content']['resourceList'])){ + continue; + } + $beikepath = $sessionName . '/备课/'; + if(!is_dir($beikepath)){ + mkdir($beikepath,0755,true); + } + $resourceLists = $kk['content']['resourceList']; + foreach($resourceLists as $resourceList){ + $file = $beikepath . $resourceList['fileName'] ; + if(Str::endsWith($file,['.mp4','.mov','.MP4','.mkv','.wmv'])){ + $dd = $curr->getVideoUrl($resourceList['fileUrl']); + $downloadurl = $dd['data']; + }else{ + $downloadurl = $resourceList['fileUrl']; + } + // 保存下载地址 + $txt = "{$file}-下载地址.txt"; + $this->savetxt($txt,$downloadurl); + $check = $this->checkfile($downloadurl,$file); + if(!$check && !is_file($file)){ + dump('下载备课:' . $file); + // $result = $curl->_fastDownload($downloadurl,$file); + // dump('备课下载结果:',$result); + // if($result){ + // $this->complete($downloadurl,$file); + // } + $this->aria2->addUri( + [$downloadurl], + ['dir'=>$beikepath, + 'out'=>$resourceList['fileName']] + ); + }else if($check && !is_file($file)){ + copy($check,$file); + dump('跳过备课:' . $file); + }else{ + dump('备课文件已存在:' . $file); + $this->complete($downloadurl,$file); + } + } + break; + case '15': + // 课程内容 + if(is_null($kk['content']['courseContent']))break; + $file = "{$sessionName}/课程内容.txt"; + $this->savetxt($file,strip_tags($kk['content']['courseContent'])); + break; + case '16': + break; + case '18': + break; + default: + break; + } + // break; + } + } + } + // break; + } + $this->completed = true; + } + private function checkfile($url,$file) + { + $key = 'lebolebo_check_header_'.md5($url); + try { + if(($head = Cache::get($key,null)) === NULL ){ + $head = @get_headers($url,1); + if ($head === false) { + dump('获取文件信息失败,直接重新下载'.$file); + return false; + } + Cache::set($key,$head,86400); + } + $kk = 'lebolebo_file_' . pathinfo($file,PATHINFO_BASENAME); + if(isset($head['Content-Length']) && ($size = intval($head['Content-Length']))){ + $kk .= $size; + if(is_file($file) && ($size !== filesize($file))){ + dump('文件大小不符,重新下载'.$file); + unlink($file); + return false; + } + } + if(isset($head['ETag'])){ + $t = $kk . md5($head['ETag']); + if(Cache::has($t)){ + return Cache::get($t); + } + } + if(isset($head['Content-MD5'])){ + $t = $kk . md5($head['Content-MD5']); + if(Cache::has($t)){ + return Cache::get($t); + } + } + } catch (Exception $e) { + dump('检查文件失败:',$url,$file,$e); + exit; + } + return false; + } + private function complete($url,$file) + { + $key = 'lebolebo_check_header_' . md5($url); + try { + if(($head = Cache::get($key,null)) === NULL ){ + $head = @get_headers($url,1); + if($head === false){ + return false; + } + Cache::set($key,$head,86400); + } + $kk = 'lebolebo_file_' . pathinfo($file,PATHINFO_BASENAME); + if(isset($head['Content-Length'])){ + $kk .= intval($head['Content-Length']); + } + if(isset($head['ETag'])){ + $t = $kk . md5($head['ETag']); + Cache::set($t,$file,86400); + } + if(isset($head['Content-MD5'])){ + $t = $kk . md5($head['Content-MD5']); + Cache::set($t,$file,86400); + } + } catch (Exception $e) { + dump($e); + exit; + } + } + private function savetxt(string $file,string $content) + { + if(is_file($file)){ + unlink($file); + } + $myfile = fopen($file, "w"); + fwrite($myfile, $content); + fclose($myfile); + // dump('已保存文本内容:'.$file); + } + private function waiting() + { + $num = 1; + while($num > 0){ + $activeDownloads = $this->aria2->getGlobalStat(); + $num = intval($activeDownloads['result']['numWaiting']); + if($num > 10){ + dump('当前任务过多,等待任务数:',$num); + sleep(1); + }else{ + break; + } + } + } +} diff --git a/app/command/Zm.php b/app/command/Zm.php new file mode 100644 index 0000000..8587e7e --- /dev/null +++ b/app/command/Zm.php @@ -0,0 +1,256 @@ +setName('zm') + ->setDescription('zm command'); + } + + protected function execute(Input $input, Output $output) + { + // 输出结果 + // $output->writeln("Hello, {$name}!"); + // $output->writeln("Option: {$option}"); + $this->aria2 = new Aria2('http://127.0.0.1:16800/jsonrpc','11223344'); //实例化aria2对象 + $this->aria2->setOption('enable-async-dns', true); //设置异步dns解析 + $this->aria2->setOption('enable-http-pipelining', true); //设置http管道化 + $this->aria2->setOption('enable-http-keep-alive', true); //设置http保持连接 + $this->completed = false; + while($this->completed === false){ + try { + $this->start(); + } catch (\Exception $e) { + halt($e); + sleep(3); + } + } + dump('下载完成!'); + } + protected function start() + { + $savepath = 'E:/zm'; + $lable = $this->getLable(); + if($lable['code'] == 0){ + $leftLabel = $lable['data']['leftLabel']; + foreach ($leftLabel[0]['children'] as $key => $course) { + $lable_title = $course['title']; + $lable_id = $course['id']; + $next = true; + $curr_page = 1; + $curr_total = 0; + while($next){ + $curr = $this->getCurr($lable_id,$curr_page); + $currs = $curr['data']['curriculum']; + foreach ($currs as $key => $value) { + $curr_total++; + $curr_item = $value; + $curr_item_title = $curr_item['title']; + $c = $savepath . '/' . $lable_title . '/' . $curr_item_title; + // dump('存储路径',$c); + is_dir($c) || mkdir($c,0755,true); + + $author = $savepath . '/' . $lable_title . '/' . $curr_item_title . '/' . '作者.txt'; + $this->savetxt($author,$curr_item['author']); + + $introduce = $savepath . '/' . $lable_title . '/' . $curr_item_title . '/' . '介绍.txt'; + $this->savetxt($introduce,$curr_item['introduce']); + + $cover = $curr_item['cover']; + $this->download($cover,$c); + + $cover_name = basename($cover); + $cover_path = "{$c}/{$cover_name}-下载地址.txt"; + $this->savetxt($cover_path,$cover); + $curr_details = $this->getCurrDetails($curr_item['id']); + foreach($curr_details['data']['curriculum']['allClassSectionTrue'] as $class){ + $class_path = $c . '/' . $class['title']; + is_dir($class_path) || mkdir($class_path,0755,true); + $class_details = $this->getClassDetails($class['id']); + dump($class_path,$class_details); + $class_id = $class_details['data']['classSection']['id']; + + if(!empty($class_details['data']['classSection']['video'])){ + $this->download($class_details['data']['classSection']['video'],$class_path); + } + if(!empty($class_details['data']['classSection']['courseware'])){ + $this->download($class_details['data']['classSection']['courseware'],$class_path); + } + if(!empty($class_details['data']['classSection']['construction_draw'])){ + $this->download($class_details['data']['classSection']['construction_draw'],$class_path); + } + if(!empty($class_details['data']['classSection']['construction_draw_3d'])){ + $this->download($class_details['data']['classSection']['construction_draw_3d'],$class_path); + } + + foreach($class_details['data']['classSection']['allEnclosure'] as $enclosure){ + $parts = explode("{$class_id}/", $enclosure['url']); + + $path = parse_url($enclosure['url'], PHP_URL_PATH); + $parts = explode('/', $path); + $this->download($enclosure['url'],$class_path . '/' . urldecode($parts[count($parts)-2])); + } + } + } + $curr_page++; + if($curr_total >= $curr['data']['total']){ + $next = false; + break; + } + } + // exit(); + } + dump($leftLabel); + }else{ + dump($lable['msg']); + exit(); + } + exit(); + } + protected function download($downloadurl,$dir,$filename = null) + { + $result = $this->aria2->addUri( + [$downloadurl], + ['dir'=>$dir, + 'header'=>[ + 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.97 Safari/537.36 Core/1.116.489.400 QQBrowser/13.7.6351.400', + 'referer: https://edu.zmrobo.com/courses', + ], + 'out'=>$filename] + ); + } + public function getLable($sign = 'null') + { + $client = new Client(); + $result = $client->get("https://edu.zmrobo.com/api/label",[ + 'headers'=>[ + 'User-Agent'=>'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.97 Safari/537.36 Core/1.116.489.400 QQBrowser/13.7.6351.400', + 'referer'=>'https://edu.zmrobo.com/courses', + 'E-Date'=>time(), + 'Sign'=>$sign, + ] + ]); + $result = json_decode($result->getBody()->getContents(),true); + if($result['code'] == -3){ + return $this->getLable($result['sign']); + }else{ + return $result; + } + } + public function getCurr($label_id,$page,$sign = 'null') + { + $client = new Client(); + $options = [ + 'headers'=>[ + 'User-Agent'=>'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.97 Safari/537.36 Core/1.116.489.400 QQBrowser/13.7.6351.400', + 'referer'=>'https://edu.zmrobo.com/courses', + 'E-Date'=>time(), + 'Content-Type'=>'application/json; charset=utf-8', + 'Origin'=>'https://edu.zmrobo.com', + 'Sign'=>$sign, + ], + 'body'=>json_encode([ + 'label'=>[[$label_id]], + 'page'=>$page, + ]) + ]; + $result = $client->post("https://edu.zmrobo.com/api/curriculum/list",$options); + $result = json_decode($result->getBody()->getContents(),true); + if($result['code'] == -3){ + return $this->getCurr($label_id,$page,$result['sign']); + }else if($result['code'] == 0){ + return $result; + }else{ + dump($result['msg']); + exit(); + } + } + + + public function getCurrDetails($curr_id,$sign = 'null') + { + $client = new Client(); + $options = [ + 'headers'=>[ + 'User-Agent'=>'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.97 Safari/537.36 Core/1.116.489.400 QQBrowser/13.7.6351.400', + 'referer'=>'https://edu.zmrobo.com/courses', + 'E-Date'=>time(), + 'Content-Type'=>'application/json; charset=utf-8', + 'Origin'=>'https://edu.zmrobo.com', + 'Sign'=>$sign, + ], + 'body'=>json_encode([ + 'id'=>$curr_id, + 'user_id'=>$this->user_id, + ]) + ]; + $result = $client->post("https://edu.zmrobo.com/api/curriculum/details",$options); + $result = json_decode($result->getBody()->getContents(),true); + if($result['code'] == -3){ + return $this->getCurrDetails($curr_id,$result['sign']); + }else if($result['code'] == 0){ + return $result; + }else{ + dump($result['msg']); + exit(); + } + } + public function getClassDetails($curr_id,$sign = 'null') + { + $client = new Client(); + $options = [ + 'headers'=>[ + 'User-Agent'=>'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.97 Safari/537.36 Core/1.116.489.400 QQBrowser/13.7.6351.400', + 'referer'=>'https://edu.zmrobo.com/courses', + 'E-Date'=>time(), + 'Content-Type'=>'application/json', + 'Origin'=>'https://edu.zmrobo.com', + 'Sign'=>$sign, + ], + 'body'=>json_encode([ + 'id'=>$curr_id, + 'user_id'=>$this->user_id, + 'token'=>"7aa22a83fece93ed3e5a3119b085ced9", + ]) + ]; + $result = $client->post("https://edu.zmrobo.com/api/class/details",$options); + $result = json_decode($result->getBody()->getContents(),true); + if($result['code'] == -3){ + return $this->getClassDetails($curr_id,$result['sign']); + }else if($result['code'] == 0){ + return $result; + }else{ + dump($result['msg']); + exit(); + } + } + + + + private function savetxt(string $file,string $content) + { + if(is_file($file)){ + unlink($file); + } + $myfile = fopen($file, "w"); + fwrite($myfile, $content); + fclose($myfile); + // dump('已保存文本内容:'.$file); + } +} \ No newline at end of file diff --git a/app/command/account.php b/app/command/account.php new file mode 100644 index 0000000..4f03324 --- /dev/null +++ b/app/command/account.php @@ -0,0 +1,34 @@ +setName('account') + ->setDescription('the account command'); + } + + protected function execute(Input $input, Output $output) + { + $account = new a(); + dump($account); + dump($account->login('13088393927','393927')); + // 指令输出 + $output->writeln('account'); + } +} diff --git a/app/command/test.php b/app/command/test.php new file mode 100644 index 0000000..3d91287 --- /dev/null +++ b/app/command/test.php @@ -0,0 +1,42 @@ +setName('test') + ->setDescription('the test command'); + } + + protected function execute(Input $input, Output $output) + { + + $aria2 = new Aria2('http://127.0.0.1:16800/jsonrpc'); + try { + // 获取所有活动的下载任务 + $activeDownloads = $aria2->getGlobalStat(); + + dump('正在下载的任务数量:',intval($activeDownloads['result']['numWaiting'])); + // dump('等待下载的任务数量:',$waitingCount); + + } catch (Exception $e) { + dump($e); + } + // 指令输出 + // $output->writeln('test'); + } +} diff --git a/app/common.php b/app/common.php new file mode 100644 index 0000000..401f498 --- /dev/null +++ b/app/common.php @@ -0,0 +1,17 @@ +*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }

:)

ThinkPHP V' . \think\facade\App::version() . '
16载初心不改 - 你值得信赖的PHP框架

[ V6.0 版本由 亿速云 独家赞助发布 ]
'; + } + + public function hello($name = 'ThinkPHP6') + { + return 'hello,' . $name; + } +} diff --git a/app/controller/Test.php b/app/controller/Test.php new file mode 100644 index 0000000..75a39bb --- /dev/null +++ b/app/controller/Test.php @@ -0,0 +1,116 @@ +login('13088393927','HIMIsm1yxpt4')); + } + public function index() + { + $savepath = store_path() . '/lebolebo/'; + $curl = new Curl(); + $curr = new Curriculum(); + $course = $curr->list(0); + foreach ($course['data']['list'] as $list){ + $c = $savepath . $list['courseName']; + is_dir($c) || mkdir($c); + dump($curr->course($list['courseCode'])); + $detail = $curr->detail($list['id']); + dump($detail); + $courseCover = $c . '/courseCover' . '.png'; + is_file($courseCover) || $curl->download($detail['data']['courseCover'],$courseCover); + $d = $curr->courseUnitList($list['courseCode']); + $courseUnits = $d['data']['courseUnit']; + foreach ($courseUnits as $courseUnit){ + $courseUnitName = $c . '/' . str_ireplace('/','-',$courseUnit['courseUnitName']); + if(!is_dir($t)){ + dump($t); + mkdir($t); + } + $selectByCourseUnits = $curr->selectByCourseUnits($courseUnit['courseCode'],$courseUnit['courseUnitCode']); + foreach ($selectByCourseUnits['data'] as $selectByCourseUnit){ + $sessionName = $courseUnitName . '/' . $selectByCourseUnit['sessionName']; + if(!is_dir($sessionName)){ + dump($sessionName); + mkdir($sessionName,0755,true); + } + $t = $curr->selectByCourseSessionCode($selectByCourseUnit['courseSessionCode']); + // 0: {type: 1, des: "PPT-HTML"} + // 1: {type: 2, des: "讲义"} + // 2: {type: 3, des: "课前预习"} + // 3: {type: 4, des: "测一测"} + // 4: {type: 5, des: "玩一玩"} + // 5: {type: 6, des: "试一试"} + // 6: {type: 9, des: "知识点"} + // 7: {type: 10, des: "名人名言"} + // 8: {type: 11, des: "录播课"} + // 9: {type: 13, des: "教辅"} + // 10: {type: 14, des: "备课"} + // 11: {type: 15, des: "课程内容"} + // 12: {type: 16, des: "课后拓展"} + // 13: {type: 18, des: "素养目标"} + $ts = $t['data']; + foreach ($ts as $kk ){ + switch ($kk['resourceType']) { + case '1':// PPT-HTML + if(!isset($kk['content'])){ + continue; + } + $filename = $kk['content']['fileName']; + $name = $kk['content']['fileUrl']; + if(!is_file($sessionName . '/' . $filename)){ + $curl->download($name,$sessionName . '/' . $filename); + } + break; + case '2': + break; + case '3': + break; + case '4': + break; + case '5': + break; + case '6': + break; + case '9': + break; + case '10': + break; + case '11': + break; + case '13': + break; + case '14': + break; + case '15': + break; + case '16': + break; + case '18': + break; + default: + break; + } + // break; + } + } + } + // break; + } + // dump($course); + } + public function __call($method,$args) + { + dump('没有'.$method); + } +} \ No newline at end of file diff --git a/app/event.php b/app/event.php new file mode 100644 index 0000000..e9851bb --- /dev/null +++ b/app/event.php @@ -0,0 +1,17 @@ + [ + ], + + 'listen' => [ + 'AppInit' => [], + 'HttpRun' => [], + 'HttpEnd' => [], + 'LogLevel' => [], + 'LogWrite' => [], + ], + + 'subscribe' => [ + ], +]; diff --git a/app/kernel/Lebolebo/Account.php b/app/kernel/Lebolebo/Account.php new file mode 100644 index 0000000..d992686 --- /dev/null +++ b/app/kernel/Lebolebo/Account.php @@ -0,0 +1,36 @@ +client = new Client([ + 'timeout' => 10, + ]); + } + + public function login(string $username,string $password) + { + $url = 'https://api-manage2.shengtongedu.cn/st-permission-server/saas/account/login'; + $options = [ + 'body'=>json_encode([ + 'campusIdList'=>['1863'], + 'loginCode'=>$username, + 'loginPassword'=>md5($password), + 'platform'=>'OMO_WEB', + ]), + 'headers'=>[ + 'user-agent'=>'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 Core/1.94.196.400 QQBrowser/11.7.5286.400', + 'platform'=>'OMO_WEB', + 'content-type'=>'application/json; charset=utf-8', + ] + ]; + $result = $this->client->post($url,$options); + return json_decode($result->getBody()->getContents(),true); + } +} \ No newline at end of file diff --git a/app/kernel/Lebolebo/Curriculum.php b/app/kernel/Lebolebo/Curriculum.php new file mode 100644 index 0000000..a1d2aba --- /dev/null +++ b/app/kernel/Lebolebo/Curriculum.php @@ -0,0 +1,173 @@ +'1863', + 'logincode'=>'13880615958', + 'platform'=>'OMO_WEB', + 'referer'=>'http://manage.shengtongedu.cn/', + 'token'=>'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2ODE4MDAxMTcsInVzZXJDb2RlIjoiMTMwODgzOTM5MjcifQ.Wy61_ITLuag4JwYLhAOosEBz2Fsw-hCgGrrF-rgoQZM', + 'user-agent'=>'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 Core/1.94.196.400 QQBrowser/11.7.5286.400', + 'content-type'=>'application/json; charset=utf-8', + 'origin'=>'http://manage.shengtongedu.cn', + ]; + protected $config = [ + 'cache_time'=>86400 + ]; + public function setHeader(string $key,string $value) + { + $this->headers[$key] = $value; + } + public function __construct() + { + $this->client = new Client([ + 'timeout' => 30, + ]); + } + + public function list(int $page = 0) + { + $url = 'https://api-manage2.shengtongedu.cn/st-course-server/manage/course/coursePageListV3'; + $options = [ + 'body'=>json_encode([ + 'campusIdList'=>["1863"], + 'pageNum'=>$page, + 'pageSize'=>200, + 'platform'=>"OMO_WEB", + 'total'=>101, + ]), + 'headers'=>$this->headers + ]; + $result = $this->client->post($url,$options); + return json_decode($result->getBody()->getContents(),true); + } + public function getVideoUrl($videoId) + { + $key = 'lebolebo_curriculum_getVideoUrl_' . $videoId; + // if(($data = Cache::get($key,null)) !== null ){ + // return $data; + // } + $url = 'https://api-manage2.shengtongedu.cn/st-msg-server/msg/bjy/getVideoUrl'; + $options = [ + 'body'=>json_encode([ + 'campusIdList'=>["1863"], + 'platform'=>"OMO_WEB", + 'companyId'=>'139', + 'videoId'=>$videoId, + ]), + 'headers'=>$this->headers + ]; + $result = $this->client->post($url,$options); + $d = json_decode($result->getBody()->getContents(),true); + Cache::set($key,$d,$this->config['cache_time']); + return $d; + } + public function courseUnitList(string $courseCode) + { + $key = 'lebolebo_curriculum_courseUnitList_' . $courseCode; + if(($data = Cache::get($key,null)) !== null ){ + return $data; + } + $url = 'https://api-manage2.shengtongedu.cn/st-course-server/manage/course/unit/courseUnitList'; + $options = [ + 'body'=>json_encode([ + 'campusIdList'=>["1863"], + 'platform'=>"OMO_WEB", + 'courseCode'=>$courseCode, + ]), + 'headers'=>$this->headers + ]; + $result = $this->client->post($url,$options); + $d = json_decode($result->getBody()->getContents(),true); + Cache::set($key,$d,$this->config['cache_time']); + return $d; + + } + public function selectByCourseSessionCode(string $courseSessionCode) + { + $key = 'lebolebo_curriculum_selectByCourseSessionCode_' . $courseSessionCode; + if(($data = Cache::get($key,null)) !== null ){ + return $data; + } + $url = 'https://api-manage2.shengtongedu.cn/st-course-server/manage/course/resource/selectByCourseSessionCode'; + $options = [ + 'body'=>json_encode([ + 'campusIdList'=>["1863"], + 'platform'=>"OMO_WEB", + 'courseSessionCode'=>$courseSessionCode, + ]), + 'headers'=>$this->headers + ]; + $result = $this->client->post($url,$options); + $d = json_decode($result->getBody()->getContents(),true); + Cache::set($key,$d,$this->config['cache_time']); + return $d; + } + public function selectByCourseUnits(string $courseCode,string $courseUnitCode) + { + $key = 'lebolebo_curriculum_selectByCourseUnits_' . $courseCode . $courseUnitCode; + if(($data = Cache::get($key,null)) !== null ){ + return $data; + } + $url = 'https://api-manage2.shengtongedu.cn/st-course-server/manage/course/sesson/selectByCourseUnits'; + $options = [ + 'body'=>json_encode([ + 'campusIdList'=>["1863"], + 'platform'=>"OMO_WEB", + 'courseCode'=>$courseCode, + 'courseUnitCode'=>$courseUnitCode + ]), + 'headers'=>$this->headers + ]; + $result = $this->client->post($url,$options); + $d = json_decode($result->getBody()->getContents(),true); + Cache::set($key,$d,$this->config['cache_time']); + return $d; + } + public function detail(int $id) + { + $key = 'lebolebo_curriculum_detail_' . $id; + if(($data = Cache::get($key,null)) !== null ){ + return $data; + } + $url = 'https://api-manage2.shengtongedu.cn/st-course-server/manage/course/detailV2'; + $options = [ + 'body'=>json_encode([ + 'campusIdList'=>["1863"], + 'platform'=>"OMO_WEB", + 'id'=>$id, + ]), + 'headers'=>$this->headers + ]; + $result = $this->client->post($url,$options); + $d = json_decode($result->getBody()->getContents(),true); + Cache::set($key,$d,$this->config['cache_time']); + return $d; + } + public function course(string $code) + { + $key = 'lebolebo_curriculum_course_'.$code; + if(($data = Cache::get($key,null)) !== null ){ + return $data; + } + $url = 'https://api-manage2.shengtongedu.cn/st-course-server/manage/course/unit/courseUnitList'; + $options = [ + 'body'=>json_encode([ + 'campusIdList'=>["1863"], + 'platform'=>"OMO_WEB", + 'courseCode'=>$code, + ]), + 'headers'=>$this->headers + ]; + $result = $this->client->post($url,$options); + $d = json_decode($result->getBody()->getContents(),true); + Cache::set($key,$d,$this->config['cache_time']); + return $d; + } +} \ No newline at end of file diff --git a/app/middleware.php b/app/middleware.php new file mode 100644 index 0000000..d2c3fda --- /dev/null +++ b/app/middleware.php @@ -0,0 +1,10 @@ + Request::class, + 'think\exception\Handle' => ExceptionHandle::class, +]; diff --git a/app/service.php b/app/service.php new file mode 100644 index 0000000..db1ee6a --- /dev/null +++ b/app/service.php @@ -0,0 +1,9 @@ +=7.2.5", + "topthink/framework": "^6.1.0", + "topthink/think-orm": "^2.0", + "topthink/think-filesystem": "^1.0", + "guzzlehttp/guzzle": "~6.0", + "php-curl-class/php-curl-class": "^9.14", + "topthink/think-helper": "^3.1", + "daijie/aria2": "^1.1" + }, + "require-dev": { + "symfony/var-dumper": "^4.2", + "topthink/think-trace": "^1.0" + }, + "autoload": { + "psr-4": { + "app\\": "app" + }, + "psr-0": { + "": "extend/" + } + }, + "config": { + "preferred-install": "dist" + }, + "scripts": { + "post-autoload-dump": [ + "@php think service:discover", + "@php think vendor:publish" + ] + }, + "repositories": { + "packagist": { + "type": "composer", + "url": "https://mirrors.aliyun.com/composer/" + } + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..b48b18a --- /dev/null +++ b/composer.lock @@ -0,0 +1,1468 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "d6bbbbddb2fa51632500960dcedcee8c", + "packages": [ + { + "name": "daijie/aria2", + "version": "v1.1", + "source": { + "type": "git", + "url": "https://github.com/shiny/php-aria2.git", + "reference": "2954b52c816154bbea035adfc00c200b575b284c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/shiny/php-aria2/zipball/2954b52c816154bbea035adfc00c200b575b284c", + "reference": "2954b52c816154bbea035adfc00c200b575b284c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-curl": "*", + "php": ">=5.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "WTFPL" + ], + "authors": [ + { + "name": "DaiJie", + "email": "daijie@php.net" + } + ], + "description": "talk with aria2", + "homepage": "https://github.com/shiny/php-aria2", + "keywords": [ + "aria2" + ], + "support": { + "issues": "https://github.com/shiny/php-aria2/issues", + "source": "https://github.com/shiny/php-aria2/tree/master" + }, + "time": "2017-01-03T11:23:36+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.5.8", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/guzzlehttp/guzzle/6.5.8/guzzlehttp-guzzle-6.5.8.zip", + "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.9", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2022-06-20T22:16:07+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.5.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "b94b2807d85443f9719887892882d0329d1e2598" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/guzzlehttp/promises/1.5.2/guzzlehttp-promises-1.5.2.zip", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2022-08-28T14:55:35+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.9.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/guzzlehttp/psr7/1.9.0/guzzlehttp-psr7-1.9.0.zip", + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2022-06-20T21:43:03+00:00" + }, + { + "name": "league/flysystem", + "version": "1.1.10", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/league/flysystem/1.1.10/league-flysystem-1.1.10.zip", + "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/mime-type-detection": "^1.3", + "php": "^7.2.5 || ^8.0" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/prophecy": "^1.11.1", + "phpunit/phpunit": "^8.5.8" + }, + "suggest": { + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2022-10-04T09:16:37+00:00" + }, + { + "name": "league/flysystem-cached-adapter", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-cached-adapter.git", + "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/league/flysystem-cached-adapter/1.1.0/league-flysystem-cached-adapter-1.1.0.zip", + "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff", + "shasum": "" + }, + "require": { + "league/flysystem": "~1.0", + "psr/cache": "^1.0.0" + }, + "require-dev": { + "mockery/mockery": "~0.9", + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7", + "predis/predis": "~1.0", + "tedivm/stash": "~0.12" + }, + "suggest": { + "ext-phpredis": "Pure C implemented extension for PHP" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Cached\\": "src/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "frankdejonge", + "email": "info@frenky.net" + } + ], + "description": "An adapter decorator to enable meta-data caching.", + "time": "2020-07-25T15:56:04+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/league/mime-type-detection/1.11.0/league-mime-type-detection-1.11.0.zip", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "time": "2022-04-17T13:12:02+00:00" + }, + { + "name": "php-curl-class/php-curl-class", + "version": "9.14.3", + "source": { + "type": "git", + "url": "https://github.com/php-curl-class/php-curl-class.git", + "reference": "5d87676a3a7f83dd33d65f3c8d97f36679305193" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/php-curl-class/php-curl-class/9.14.3/php-curl-class-php-curl-class-9.14.3.zip", + "reference": "5d87676a3a7f83dd33d65f3c8d97f36679305193", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=7.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "*", + "ext-gd": "*", + "phpcompatibility/php-compatibility": "dev-develop", + "phpcsstandards/phpcsutils": "@alpha", + "phpunit/phpunit": "*", + "squizlabs/php_codesniffer": "*", + "vimeo/psalm": "*" + }, + "suggest": { + "ext-mbstring": "*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Curl\\": "src/Curl/" + } + }, + "license": [ + "Unlicense" + ], + "authors": [ + { + "name": "Zach Borboa" + } + ], + "description": "PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs.", + "homepage": "https://github.com/php-curl-class/php-curl-class", + "keywords": [ + "API-Client", + "api", + "class", + "client", + "curl", + "framework", + "http", + "http-client", + "http-proxy", + "json", + "php", + "php-curl", + "php-curl-library", + "proxy", + "requests", + "restful", + "web-scraper", + "web-scraping ", + "web-service", + "xml" + ], + "time": "2023-03-13T18:02:56+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/psr/cache/1.0.1/psr-cache-1.0.1.zip", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/psr/container/1.1.1/psr-container-1.1.1.zip", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/http-message", + "version": "1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/psr/http-message/1.1/psr-http-message-1.1.zip", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2023-04-04T09:50:52+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/psr/log/1.1.4/psr-log-1.1.4.zip", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/psr/simple-cache/1.0.1/psr-simple-cache-1.0.1.zip", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/ralouphie/getallheaders/3.0.3/ralouphie-getallheaders-3.0.3.zip", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/symfony/polyfill-intl-idn/v1.27.0/symfony-polyfill-intl-idn-v1.27.0.zip", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/symfony/polyfill-intl-normalizer/v1.27.0/symfony-polyfill-intl-normalizer-v1.27.0.zip", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/symfony/polyfill-php72/v1.27.0/symfony-polyfill-php72-v1.27.0.zip", + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "topthink/framework", + "version": "v6.1.2", + "source": { + "type": "git", + "url": "https://github.com/top-think/framework.git", + "reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/topthink/framework/v6.1.2/topthink-framework-v6.1.2.zip", + "reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=7.2.5", + "psr/container": "~1.0", + "psr/http-message": "^1.0", + "psr/log": "~1.0", + "psr/simple-cache": "^1.0", + "topthink/think-helper": "^3.1.1", + "topthink/think-orm": "^2.0|^3.0" + }, + "require-dev": { + "guzzlehttp/psr7": "^2.1.0", + "mikey179/vfsstream": "^1.6", + "mockery/mockery": "^1.2", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "autoload": { + "files": [], + "psr-4": { + "think\\": "src/think/" + } + }, + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "liu21st", + "email": "liu21st@gmail.com" + }, + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ], + "description": "The ThinkPHP Framework.", + "homepage": "http://thinkphp.cn/", + "keywords": [ + "framework", + "orm", + "thinkphp" + ], + "time": "2023-02-08T02:24:01+00:00" + }, + { + "name": "topthink/think-filesystem", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-filesystem.git", + "reference": "29f19f140a9267c717fecd7ccb22c84c2d72382e" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/topthink/think-filesystem/v1.0.3/topthink-think-filesystem-v1.0.3.zip", + "reference": "29f19f140a9267c717fecd7ccb22c84c2d72382e", + "shasum": "" + }, + "require": { + "league/flysystem": "^1.1.4", + "league/flysystem-cached-adapter": "^1.0", + "php": ">=7.2.5", + "topthink/framework": "^6.1|^8.0" + }, + "require-dev": { + "mikey179/vfsstream": "^1.6", + "mockery/mockery": "^1.2", + "phpunit/phpunit": "^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "think\\": "src" + } + }, + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ], + "description": "The ThinkPHP6.1 Filesystem Package", + "time": "2023-02-08T01:25:15+00:00" + }, + { + "name": "topthink/think-helper", + "version": "v3.1.6", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-helper.git", + "reference": "769acbe50a4274327162f9c68ec2e89a38eb2aff" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/topthink/think-helper/v3.1.6/topthink-think-helper-v3.1.6.zip", + "reference": "769acbe50a4274327162f9c68ec2e89a38eb2aff", + "shasum": "" + }, + "require": { + "php": ">=7.1.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/helper.php" + ], + "psr-4": { + "think\\": "src" + } + }, + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ], + "description": "The ThinkPHP6 Helper Package", + "time": "2021-12-15T04:27:55+00:00" + }, + { + "name": "topthink/think-orm", + "version": "v2.0.60", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-orm.git", + "reference": "8bc34a4307fa27186c0e96a9b3de3cb23aa1ed46" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/topthink/think-orm/v2.0.60/topthink-think-orm-v2.0.60.zip", + "reference": "8bc34a4307fa27186c0e96a9b3de3cb23aa1ed46", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pdo": "*", + "php": ">=7.1.0", + "psr/log": "^1.0|^2.0", + "psr/simple-cache": "^1.0|^2.0", + "topthink/think-helper": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^7|^8|^9.5" + }, + "type": "library", + "autoload": { + "files": [ + "stubs/load_stubs.php" + ], + "psr-4": { + "think\\": "src" + } + }, + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "liu21st", + "email": "liu21st@gmail.com" + } + ], + "description": "think orm", + "keywords": [ + "database", + "orm" + ], + "time": "2023-03-19T04:51:56+00:00" + } + ], + "packages-dev": [ + { + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/symfony/polyfill-mbstring/v1.27.0/symfony-polyfill-mbstring-v1.27.0.zip", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/symfony/polyfill-php80/v1.27.0/symfony-polyfill-php80-v1.27.0.zip", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v4.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "1069c7a3fca74578022fab6f81643248d02f8e63" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/symfony/var-dumper/v4.4.47/symfony-var-dumper-v4.4.47.zip", + "reference": "1069c7a3fca74578022fab6f81643248d02f8e63", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php72": "~1.5", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", + "symfony/console": "<3.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^3.4|^4.0|^5.0", + "symfony/process": "^4.4|^5.0", + "twig/twig": "^1.43|^2.13|^3.0.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2022-10-03T15:15:11+00:00" + }, + { + "name": "topthink/think-trace", + "version": "v1.6", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-trace.git", + "reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142" + }, + "dist": { + "type": "zip", + "url": "https://repo.huaweicloud.com/repository/php/topthink/think-trace/v1.6/topthink-think-trace-v1.6.zip", + "reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142", + "shasum": "" + }, + "require": { + "php": ">=7.1.0", + "topthink/framework": "^6.0|^8.0" + }, + "type": "library", + "extra": { + "think": { + "services": [ + "think\\trace\\Service" + ], + "config": { + "trace": "src/config.php" + } + } + }, + "autoload": { + "psr-4": { + "think\\trace\\": "src" + } + }, + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "liu21st", + "email": "liu21st@gmail.com" + } + ], + "description": "thinkphp debug trace", + "time": "2023-02-07T08:36:32+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.2.5" + }, + "platform-dev": [], + "plugin-api-version": "2.3.0" +} diff --git a/config/app.php b/config/app.php new file mode 100644 index 0000000..8c15313 --- /dev/null +++ b/config/app.php @@ -0,0 +1,32 @@ + env('app.host', ''), + // 应用的命名空间 + 'app_namespace' => '', + // 是否启用路由 + 'with_route' => true, + // 默认应用 + 'default_app' => 'index', + // 默认时区 + 'default_timezone' => 'Asia/Shanghai', + + // 应用映射(自动多应用模式有效) + 'app_map' => [], + // 域名绑定(自动多应用模式有效) + 'domain_bind' => [], + // 禁止URL访问的应用列表(自动多应用模式有效) + 'deny_app_list' => [], + + // 异常页面的模板文件 + 'exception_tmpl' => app()->getThinkPath() . 'tpl/think_exception.tpl', + + // 错误显示信息,非调试模式有效 + 'error_message' => '页面错误!请稍后再试~', + // 显示错误信息 + 'show_error_msg' => true, +]; diff --git a/config/cache.php b/config/cache.php new file mode 100644 index 0000000..a8d69d2 --- /dev/null +++ b/config/cache.php @@ -0,0 +1,29 @@ + env('cache.driver', 'file'), + + // 缓存连接方式配置 + 'stores' => [ + 'file' => [ + // 驱动方式 + 'type' => 'File', + // 缓存保存目录 + 'path' => '', + // 缓存前缀 + 'prefix' => '', + // 缓存有效期 0表示永久缓存 + 'expire' => 0, + // 缓存标签前缀 + 'tag_prefix' => 'tag:', + // 序列化机制 例如 ['serialize', 'unserialize'] + 'serialize' => [], + ], + // 更多的缓存连接 + ], +]; diff --git a/config/console.php b/config/console.php new file mode 100644 index 0000000..968e3b2 --- /dev/null +++ b/config/console.php @@ -0,0 +1,12 @@ + [ + 'test' => 'app\command\test', + 'lebo' => 'app\command\Lebo', + 'zm' => 'app\command\Zm', + ], +]; diff --git a/config/cookie.php b/config/cookie.php new file mode 100644 index 0000000..d3b3aab --- /dev/null +++ b/config/cookie.php @@ -0,0 +1,20 @@ + 0, + // cookie 保存路径 + 'path' => '/', + // cookie 有效域名 + 'domain' => '', + // cookie 启用安全传输 + 'secure' => false, + // httponly设置 + 'httponly' => false, + // 是否使用 setcookie + 'setcookie' => true, + // samesite 设置,支持 'strict' 'lax' + 'samesite' => '', +]; diff --git a/config/database.php b/config/database.php new file mode 100644 index 0000000..ba2ae8c --- /dev/null +++ b/config/database.php @@ -0,0 +1,63 @@ + env('database.driver', 'mysql'), + + // 自定义时间查询规则 + 'time_query_rule' => [], + + // 自动写入时间戳字段 + // true为自动识别类型 false关闭 + // 字符串则明确指定时间字段类型 支持 int timestamp datetime date + 'auto_timestamp' => true, + + // 时间字段取出后的默认时间格式 + 'datetime_format' => 'Y-m-d H:i:s', + + // 时间字段配置 配置格式:create_time,update_time + 'datetime_field' => '', + + // 数据库连接配置信息 + 'connections' => [ + 'mysql' => [ + // 数据库类型 + 'type' => env('database.type', 'mysql'), + // 服务器地址 + 'hostname' => env('database.hostname', '127.0.0.1'), + // 数据库名 + 'database' => env('database.database', ''), + // 用户名 + 'username' => env('database.username', 'root'), + // 密码 + 'password' => env('database.password', ''), + // 端口 + 'hostport' => env('database.hostport', '3306'), + // 数据库连接参数 + 'params' => [], + // 数据库编码默认采用utf8 + 'charset' => env('database.charset', 'utf8'), + // 数据库表前缀 + 'prefix' => env('database.prefix', ''), + + // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) + 'deploy' => 0, + // 数据库读写是否分离 主从式有效 + 'rw_separate' => false, + // 读写分离后 主服务器数量 + 'master_num' => 1, + // 指定从服务器序号 + 'slave_no' => '', + // 是否严格检查字段是否存在 + 'fields_strict' => true, + // 是否需要断线重连 + 'break_reconnect' => false, + // 监听SQL + 'trigger_sql' => env('app_debug', true), + // 开启字段缓存 + 'fields_cache' => false, + ], + + // 更多的数据库配置信息 + ], +]; diff --git a/config/filesystem.php b/config/filesystem.php new file mode 100644 index 0000000..e566d99 --- /dev/null +++ b/config/filesystem.php @@ -0,0 +1,24 @@ + env('filesystem.driver', 'local'), + // 磁盘列表 + 'disks' => [ + 'local' => [ + 'type' => 'local', + 'root' => app()->getRootPath() . 'storage', + ], + 'public' => [ + // 磁盘类型 + 'type' => 'local', + // 磁盘路径 + 'root' => app()->getRootPath() . 'public/storage', + // 磁盘路径对应的外部URL路径 + 'url' => '/storage', + // 可见性 + 'visibility' => 'public', + ], + // 更多的磁盘配置信息 + ], +]; diff --git a/config/lang.php b/config/lang.php new file mode 100644 index 0000000..59f320f --- /dev/null +++ b/config/lang.php @@ -0,0 +1,27 @@ + env('lang.default_lang', 'zh-cn'), + // 允许的语言列表 + 'allow_lang_list' => [], + // 多语言自动侦测变量名 + 'detect_var' => 'lang', + // 是否使用Cookie记录 + 'use_cookie' => true, + // 多语言cookie变量 + 'cookie_var' => 'think_lang', + // 多语言header变量 + 'header_var' => 'think-lang', + // 扩展语言包 + 'extend_list' => [], + // Accept-Language转义为对应语言包名称 + 'accept_language' => [ + 'zh-hans-cn' => 'zh-cn', + ], + // 是否支持语言分组 + 'allow_group' => false, +]; diff --git a/config/log.php b/config/log.php new file mode 100644 index 0000000..ea24ff9 --- /dev/null +++ b/config/log.php @@ -0,0 +1,45 @@ + env('log.channel', 'file'), + // 日志记录级别 + 'level' => [], + // 日志类型记录的通道 ['error'=>'email',...] + 'type_channel' => [], + // 关闭全局日志写入 + 'close' => false, + // 全局日志处理 支持闭包 + 'processor' => null, + + // 日志通道列表 + 'channels' => [ + 'file' => [ + // 日志记录方式 + 'type' => 'File', + // 日志保存目录 + 'path' => '', + // 单文件日志写入 + 'single' => false, + // 独立日志级别 + 'apart_level' => [], + // 最大日志文件数量 + 'max_files' => 0, + // 使用JSON格式记录 + 'json' => false, + // 日志处理 + 'processor' => null, + // 关闭通道日志写入 + 'close' => false, + // 日志输出格式化 + 'format' => '[%s][%s] %s', + // 是否实时写入 + 'realtime_write' => false, + ], + // 其它日志通道配置 + ], + +]; diff --git a/config/middleware.php b/config/middleware.php new file mode 100644 index 0000000..7e1972f --- /dev/null +++ b/config/middleware.php @@ -0,0 +1,8 @@ + [], + // 优先级设置,此数组中的中间件会按照数组中的顺序优先执行 + 'priority' => [], +]; diff --git a/config/route.php b/config/route.php new file mode 100644 index 0000000..bf934d4 --- /dev/null +++ b/config/route.php @@ -0,0 +1,45 @@ + '/', + // URL伪静态后缀 + 'url_html_suffix' => 'html', + // URL普通方式参数 用于自动生成 + 'url_common_param' => true, + // 是否开启路由延迟解析 + 'url_lazy_route' => true, + // 是否强制使用路由 + 'url_route_must' => true, + // 合并路由规则 + 'route_rule_merge' => true, + // 路由是否完全匹配 + 'route_complete_match' => true, + // 访问控制器层名称 + 'controller_layer' => 'controller', + // 空控制器名 + 'empty_controller' => 'Error', + // 是否使用控制器后缀 + 'controller_suffix' => false, + // 默认的路由变量规则 + 'default_route_pattern' => '[\w\.]+', + // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则 + 'request_cache_key' => false, + // 请求缓存有效期 + 'request_cache_expire' => null, + // 全局请求缓存排除规则 + 'request_cache_except' => [], + // 默认控制器名 + 'default_controller' => 'Index', + // 默认操作名 + 'default_action' => 'index', + // 操作方法后缀 + 'action_suffix' => '', + // 默认JSONP格式返回的处理方法 + 'default_jsonp_handler' => 'jsonpReturn', + // 默认JSONP处理方法 + 'var_jsonp_handler' => 'callback', +]; diff --git a/config/session.php b/config/session.php new file mode 100644 index 0000000..c1ef6e1 --- /dev/null +++ b/config/session.php @@ -0,0 +1,19 @@ + 'PHPSESSID', + // SESSION_ID的提交变量,解决flash上传跨域 + 'var_session_id' => '', + // 驱动方式 支持file cache + 'type' => 'file', + // 存储连接标识 当type使用cache的时候有效 + 'store' => null, + // 过期时间 + 'expire' => 1440, + // 前缀 + 'prefix' => '', +]; diff --git a/config/trace.php b/config/trace.php new file mode 100644 index 0000000..ad278a7 --- /dev/null +++ b/config/trace.php @@ -0,0 +1,10 @@ + 'Console', + // 读取的日志通道名 + 'channel' => '', +]; \ No newline at end of file diff --git a/config/view.php b/config/view.php new file mode 100644 index 0000000..01259a0 --- /dev/null +++ b/config/view.php @@ -0,0 +1,25 @@ + 'Think', + // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法 + 'auto_rule' => 1, + // 模板目录名 + 'view_dir_name' => 'view', + // 模板后缀 + 'view_suffix' => 'html', + // 模板文件名分隔符 + 'view_depr' => DIRECTORY_SEPARATOR, + // 模板引擎普通标签开始标记 + 'tpl_begin' => '{', + // 模板引擎普通标签结束标记 + 'tpl_end' => '}', + // 标签库标签开始标记 + 'taglib_begin' => '{', + // 标签库标签结束标记 + 'taglib_end' => '}', +]; diff --git a/extend/.gitignore b/extend/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/extend/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/nginx.htaccess b/nginx.htaccess new file mode 100644 index 0000000..e69de29 diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..e69de29 diff --git a/public/composer.json b/public/composer.json new file mode 100644 index 0000000..2c63c08 --- /dev/null +++ b/public/composer.json @@ -0,0 +1,2 @@ +{ +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..e71815a Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..e3c0fe9 --- /dev/null +++ b/public/index.php @@ -0,0 +1,24 @@ + +// +---------------------------------------------------------------------- + +// [ 应用入口文件 ] +namespace think; + +require __DIR__ . '/../vendor/autoload.php'; + +// 执行HTTP应用并响应 +$http = (new App())->http; + +$response = $http->run(); + +$response->send(); + +$http->end($response); diff --git a/public/nginx.htaccess b/public/nginx.htaccess new file mode 100644 index 0000000..e69de29 diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/public/router.php b/public/router.php new file mode 100644 index 0000000..9b39a62 --- /dev/null +++ b/public/router.php @@ -0,0 +1,19 @@ + +// +---------------------------------------------------------------------- +// $Id$ + +if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) { + return false; +} else { + $_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php'; + + require __DIR__ . "/index.php"; +} diff --git a/public/static/.gitignore b/public/static/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/public/static/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/route/app.php b/route/app.php new file mode 100644 index 0000000..d0d4912 --- /dev/null +++ b/route/app.php @@ -0,0 +1,21 @@ + +// +---------------------------------------------------------------------- +use think\facade\Route; + + +Route::rule(':func','test/:func')->pattern([ + 'func'=>'[a-zA-Z0-9\_\-]{1,50}' +]) +->ext('test'); + +Route::miss(function(){ + return '404'; +}); \ No newline at end of file diff --git a/think b/think new file mode 100644 index 0000000..2429d22 --- /dev/null +++ b/think @@ -0,0 +1,10 @@ +#!/usr/bin/env php +console->run(); \ No newline at end of file diff --git a/vendor/.gitignore b/vendor/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/vendor/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/view/README.md b/view/README.md new file mode 100644 index 0000000..360eb24 --- /dev/null +++ b/view/README.md @@ -0,0 +1 @@ +如果不使用模板,可以删除该目录 \ No newline at end of file