{"id":23913130,"url":"https://github.com/blankphp/blankphp","last_synced_at":"2025-04-11T14:52:46.869Z","repository":{"id":62495066,"uuid":"175000262","full_name":"blankphp/BlankPhp","owner":"blankphp","description":"一个mvc的框架","archived":false,"fork":false,"pushed_at":"2022-02-12T06:41:25.000Z","size":789,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-25T11:03:00.428Z","etag":null,"topics":["framework","mvc","mvc-framework","orm","php7"],"latest_commit_sha":null,"homepage":"https://www.blankqwq.com/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blankphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-11T12:57:26.000Z","updated_at":"2022-02-12T10:56:33.000Z","dependencies_parsed_at":"2022-11-02T11:31:37.284Z","dependency_job_id":null,"html_url":"https://github.com/blankphp/BlankPhp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blankphp%2FBlankPhp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blankphp%2FBlankPhp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blankphp%2FBlankPhp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blankphp%2FBlankPhp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blankphp","download_url":"https://codeload.github.com/blankphp/BlankPhp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248425602,"owners_count":21101389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["framework","mvc","mvc-framework","orm","php7"],"created_at":"2025-01-05T09:30:34.148Z","updated_at":"2025-04-11T14:52:46.845Z","avatar_url":"https://github.com/blankphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://i.loli.net/2019/04/08/5caaea849eb1f.png\" alt=\"BlankPhp.png\" title=\"BlankPhp.png\" /\u003e\u003cp\u003e\r\n\r\n[![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu)\r\n[![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg)](https://github.com/996icu/996.ICU/blob/master/LICENSE)\r\n[![Build Status](https://travis-ci.org/blankphp/BlankPhp.svg?branch=master)](https://travis-ci.org/blankphp/BlankPhp)\r\n\u003ca href=\"https://github.com/blankphp/BlankPhp\"\u003e\u003cimg src=\"https://img.shields.io/badge/php-7.2%2B-blue.svg\" alt=\"PHP Version\"\u003e\u003c/a\u003e\r\n\u003ca href=\"https://github.com/blankphp/BlankPhp/releases\"\u003e\u003cimg src=\"https://img.shields.io/badge/version-1.0.0-lightgrey.svg\" alt=\"Version\"\u003e\u003c/a\u003e\r\n\u003ca href=\"https://github.com/blankphp/BlankPhp\"\u003e\u003cimg src=\"https://poser.pugx.org/fastd/fastd/license\" /\u003e\u003c/a\u003e\r\n[![codecov](https://codecov.io/gh/blankphp/BlankPhp/branch/master/graph/badge.svg)](https://codecov.io/gh/blankphp/BlankPhp)\r\n#### 介绍\r\n\r\n\u003e 一个满足于基本开发的MVC轻量级框架`route` `IOC` `DB` `view` `middleware`已经设计完基本使用\r\n\r\n1. 本框架意义在于理解IOC容器，以及依赖注入的思想\r\n2. 本框架富含基本容器以及依赖注入\r\n3. 框架具有路由以及中间件和基本orm功能，满足一个基本的快速开发概念\r\n4. blankphp-swoole，blank-coolQ,blank-oauth2扩展正在书写中\r\n\r\n    书写该框架的流程，以及遇到的问题，会整理出来！\r\n\r\n\r\n#### 更新说明\r\n\r\n- [ ] 文档\r\n- [x] 容器\r\n    - [x] 依赖注入\r\n    - [x] 容器清理与重新注册\r\n- [x] 管道\r\n    - [x] 中间件\r\n    - [ ] Pipeline扩展与异常\r\n- [x] 门面\r\n    - [x] 基本完成\r\n    - [ ] 清理门面中的对象\r\n- [x] 服务提供者\r\n    - [x] register\r\n    - [x] boot\r\n    - [ ] publish\r\n- [x] Session\r\n    - [x] RedisSessionHandler\r\n    - [ ] FileSessionHandler\r\n    - [ ] DatabaseSessionHandler\r\n- [x] Database\r\n    - [x] Builder\r\n    - [x] Grammar\r\n    - [ ] Secure\r\n- [x] Cookie\r\n- [x] View\r\n    - [x] Builder\r\n    - [ ] make\r\n    - [ ] Diy\r\n- [ ] 国际化\r\n    - [ ] 国际化支持\r\n- [ ] 安全\r\n    - [ ] 验证码\r\n    - [ ] 加密\r\n    - [ ] xss\r\n    - [x] 防注入\r\n- [ ] Swoole\r\n    - [ ] Websocket\r\n    - [ ] Process\r\n    - [ ] Job\r\n    - [ ] RPC\r\n    - [ ] ...\r\n- [ ] FormValidate\r\n- [ ] Console\r\n    - [x] ConsoleKernel\r\n\r\n\r\n#### 安装教程\r\n\r\n```\r\ncomposer create-project blankqwq/blankphp:\"dev-master\" \u003c目录名称\u003e\r\n```\r\n\r\n## 参与开发\r\n\r\n\u003ca href=\"https://github.com/blankphp/framework\"\u003e核心包\u003c/a\u003e\r\n\r\n\r\n\u003e `php blank config:cache` 生成/更新配置文件\r\n\r\n```nginx\r\n   root \"\u003c目录\u003e/public\";\r\n    location / {\r\n        try_files $uri $uri/ /index.php?$query_string;\r\n    }\r\n//nginx配置好重写规则\r\n\r\n```\r\n\r\n\r\n#### 软件架构\r\n    初步建设小型容器，满足基础的mvc服务，如何写出的会以文章形式公布\r\n    1.web路由在routes/web.php中注册\r\n    2.api路由在routes/api.php注册\r\n    3.中间件注册在MiddleWareProvider中注册\r\n    3.模型设计完成一部分，暂不支持多对多，一对多等关系\r\n\r\n## 目录结构\r\n\r\n初始的目录结构如下：\r\n\r\n~~~\r\n├─app           应用目录\r\n│  ├─Controllers         控制器目录\r\n│  ├─Middleware          中间件目录\r\n│  │  ├─StartSession.php      session启动中间件\r\n│  ├─Models             模型目录\r\n│  ├─Observer           模型观察者目录\r\n│  ├─Provider           服务提供者目录\r\n│\r\n├─public                WEB目录（对外访问目录）\r\n│  ├─index.php          入口文件\r\n│  ├─static             静态目录\r\n│  └─.htaccess          用于apache的重写\r\n│\r\n│\r\n├─route                 路由注册目录\r\n│  ├─web.php           web\r\n│  ├─api.php           api\r\n|\r\n├─config                 配置文件目录\r\n│  ├─app.php           核心配置\r\n│  ├─db.php           数据库配置\r\n|\r\n│\r\n├─cache                 缓存目录\r\n├─resource              资源文件目录\r\n├─vendor                第三方类库目录（Composer依赖库）\r\n├─blank.php             命令行操作入口\r\n├─composer.json         composer 定义文件\r\n├─LICENSE               授权说明文件\r\n├─README.md             README 文件\r\n~~~\r\n\r\n\r\n```ab\r\n\u003c!--2H2G Homestead 暂未优化(关闭gzip，缓存配置文件，路由等等等)--\u003e\r\nServer Software:        nginx\r\nServer Hostname:        localhost\r\nServer Port:            80\r\n\r\nDocument Path:          /\r\nDocument Length:        1326 bytes\r\n\r\nConcurrency Level:      1000\r\nTime taken for tests:   4.686 seconds\r\nComplete requests:      10000\r\nFailed requests:        113\r\n   (Connect: 0, Receive: 0, Length: 113, Exceptions: 0)\r\nTotal transferred:      15581912 bytes\r\nHTML transferred:       13110162 bytes\r\nRequests per second:    2133.83 [#/sec] (mean)\r\nTime per request:       468.641 [ms] (mean)\r\nTime per request:       0.469 [ms] (mean, across all concurrent requests)\r\nTransfer rate:          3246.99 [Kbytes/sec] received\r\n\r\nConnection Times (ms)\r\n              min  mean[+/-sd] median   max\r\nConnect:       83  206  50.3    206     317\r\nProcessing:    51  248  61.9    247     481\r\nWaiting:        0  173  58.0    175     315\r\nTotal:        206  454  75.6    459     698\r\n\r\nPercentage of the requests served within a certain time (ms)\r\n  50%    459\r\n  66%    481\r\n  75%    502\r\n  80%    519\r\n  90%    552\r\n  95%    569\r\n  98%    579\r\n  99%    605\r\n 100%    698 (longest request)\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblankphp%2Fblankphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblankphp%2Fblankphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblankphp%2Fblankphp/lists"}