介绍
一个满足于基本开发的MVC轻量级框架route IOC DB view middleware已经设计完基本使用
本框架意义在于理解IOC容器,以及依赖注入的思想
本框架富含基本容器以及依赖注入
框架具有路由以及中间件和基本orm功能,满足一个基本的快速开发概念
blankphp-swoole,blank-coolQ,blank-oauth2扩展正在书写中
书写该框架的流程,以及遇到的问题,会整理出来!
更新说明
文档
容器
依赖注入
容器清理与重新注册
管道
中间件
Pipeline扩展与异常
门面
基本完成
清理门面中的对象
服务提供者
register
boot
publish
Session
RedisSessionHandler
FileSessionHandler
DatabaseSessionHandler
Database
Builder
Grammar
Secure
Cookie
View
Builder
make
Diy
国际化
国际化支持
安全
验证码
加密
xss
防注入
Swoole
Websocket
Process
Job
RPC
...
FormValidate
Console
ConsoleKernel
安装教程
composer create-project blankqwq/blankphp:"dev-master"
参与开发
php blank config:cache 生成/更新配置文件
root "/public";
location /{
try_files $uri $uri/ /index.php?$query_string;
}
//nginx配置好重写规则
软件架构
初步建设小型容器,满足基础的mvc服务,如何写出的会以文章形式公布
1.web路由在routes/web.php中注册
2.api路由在routes/api.php注册
3.中间件注册在MiddleWareProvider中注册
3.模型设计完成一部分,暂不支持多对多,一对多等关系
目录结构
初始的目录结构如下:
├─app 应用目录
│ ├─Controllers 控制器目录
│ ├─Middleware 中间件目录
│ │ ├─StartSession.php session启动中间件
│ ├─Models 模型目录
│ ├─Observer 模型观察者目录
│ ├─Provider 服务提供者目录
│
├─public WEB目录(对外访问目录)
│ ├─index.php 入口文件
│ ├─static 静态目录
│ └─.htaccess 用于apache的重写
│
│
├─route 路由注册目录
│ ├─web.php web
│ ├─api.php api
|
├─config 配置文件目录
│ ├─app.php 核心配置
│ ├─db.php 数据库配置
|
│
├─cache 缓存目录
├─resource 资源文件目录
├─vendor 第三方类库目录(Composer依赖库)
├─blank.php 命令行操作入口
├─composer.json composer 定义文件
├─LICENSE 授权说明文件
├─README.md README 文件
Server Software: nginx
Server Hostname: localhost
Server Port: 80
Document Path: /
Document Length: 1326 bytes
Concurrency Level: 1000
Time taken for tests: 4.686 seconds
Complete requests: 10000
Failed requests: 113
(Connect: 0, Receive: 0, Length: 113, Exceptions: 0)
Total transferred: 15581912 bytes
HTML transferred: 13110162 bytes
Requests per second: 2133.83 [#/sec] (mean)
Time per request: 468.641 [ms] (mean)
Time per request: 0.469 [ms] (mean, across all concurrent requests)
Transfer rate: 3246.99 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 83 206 50.3 206 317
Processing: 51 248 61.9 247 481
Waiting: 0 173 58.0 175 315
Total: 206 454 75.6 459 698
Percentage of the requests served within a certain time (ms)
50% 459
66% 481
75% 502
80% 519
90% 552
95% 569
98% 579
99% 605
100% 698 (longest request)