Skip to content

Commit

Permalink
更新至1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xcenweb committed Jun 18, 2022
1 parent c986290 commit c06966c
Show file tree
Hide file tree
Showing 59 changed files with 113 additions and 4,183 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,28 @@

快速、简洁、不同于MVC

### 运行快
# 安装

- 虚拟主机上最快`0.0015`秒,在一台2核服务器上运行速度最快`0.000998`
使用composer安装框架(到test目录中):

![dove](http://dove.xcenadmin.top/run_time.png)
```composer
composer create-project xcenweb/doveapi test
```

使用composer更新框架:

```composer
composer update xcenweb/doveapi
```

### 可扩展

- 框架的extend目录可通过include或者namespace等(自动)加载
- 框架已支持通过composer自由安装使用更多的包,框架的extend目录可通过include或者namespace等(自动)加载

### 完美支持一个API所需的操作

- 通过`$this->xx()`的方式完成接口的post、get接收和json、xml、void的(统一)返回。

### 不同于MVC的架构

- 持续探索中...
Expand Down
8 changes: 6 additions & 2 deletions app/__begin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php
API::start([
$this->start([
// 跨域设置
'origin' => '*',

// 设置声明的请求方法
'methods' => '*',

Expand All @@ -10,4 +13,5 @@

// 设置phpini
'ini' => [],
]);
]);
?>
2 changes: 1 addition & 1 deletion app/index.php

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions app/test.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<?php

// 初始化接口类
API::start();

if (M('g.m') == 'xml') {
// 输出模板xml
API::mxml(true,666,'this is DoveAPI',[
$this->response->mxml(true,666,'this is DoveAPI',[
'version'=>DOVE_VERSION,
'runtime'=>round(microtime(true)-DOVE_START_TIME,8).'s',
]);
} else {
// 输出模板json,输出后后面的不会被运行
API::mjson(true,666,'this is DoveAPI',[
$this->response->mjson(true,666,'this is DoveAPI',[
'version'=>DOVE_VERSION,
'runtime'=>round(microtime(true)-DOVE_START_TIME,8).'s',
]);
Expand Down
2 changes: 2 additions & 0 deletions app/test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
25 changes: 0 additions & 25 deletions app/test/api.php

This file was deleted.

42 changes: 0 additions & 42 deletions app/test/compiling.php

This file was deleted.

Empty file removed app/test/encrypt.php
Empty file.
5 changes: 0 additions & 5 deletions app/test/extend_include.php

This file was deleted.

5 changes: 0 additions & 5 deletions app/test/extend_namespace.php

This file was deleted.

31 changes: 0 additions & 31 deletions app/test/lib/cache/filecache.php

This file was deleted.

1 change: 0 additions & 1 deletion app/test/lib/cache/memcache.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/test/lib/config.php

This file was deleted.

5 changes: 0 additions & 5 deletions app/test/lib/db/medoo.php

This file was deleted.

13 changes: 0 additions & 13 deletions app/test/lib/log.php

This file was deleted.

30 changes: 0 additions & 30 deletions app/test/lib/tool/arr.php

This file was deleted.

20 changes: 0 additions & 20 deletions app/test/lib/tool/array2xml.php

This file was deleted.

7 changes: 0 additions & 7 deletions app/test/lib/tool/file.php

This file was deleted.

27 changes: 0 additions & 27 deletions app/test/lib/tool/filter.php

This file was deleted.

5 changes: 0 additions & 5 deletions app/test/lib/tool/str.php

This file was deleted.

5 changes: 0 additions & 5 deletions app/test/lib/tool/user.php

This file was deleted.

2 changes: 0 additions & 2 deletions app/test/test.php

This file was deleted.

36 changes: 36 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "xcenweb/doveapi",
"description": "doveapi framework",
"type": "project",
"license": "MIT",
"keywords": [
"framework",
"api",
"dove"
],
"authors": [
{
"name": "xcenweb",
"email": "xcenweb@qq.com"
}
],
"homepage": "http://dove.xcenadmin.top",
"support": {
"issues": "https://github.com/xcenweb/DoveAPI/issues",
"source": "https://github.com/xcenweb/DoveAPI",
"docs": "http://dove.xcenadmin.top/"
},
"require": {
"php": ">=7.4.3",
"xcenweb/doveapi-core": "@dev"
},
"autoload": {
"psr-0": {
"": "extend\\"
}
},
"config": {
"preferred-install": "dist",
"sort-packages": true
}
}
Loading

0 comments on commit c06966c

Please sign in to comment.