Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit 6fada51

Browse files
committed
update readme, some class modify
1 parent 56f9e69 commit 6fada51

File tree

5 files changed

+95
-159
lines changed

5 files changed

+95
-159
lines changed

README.md

Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# php-librarys
1+
# php librarys
22

3-
php的一些有用的基础工具库实现。
3+
php的一些有用的基础工具库实现和搜集
44

55
包含: 静态资源加载、认证、命令行应用、数据收集器、依赖注入、环境信息、事件调度、文件系统、html元素、http请求库、进程控制、队列、任务管理、各种帮助类库
66

7-
> 这是基于 php7 的分支。 如果你使用的是 php5, 请查看 [php5](https://github.com/inhere/php-librarys/tree/php5) 分支。
7+
> 这是基于 php7 的分支。 如果你使用的是 php5, 请查看 [php5](https://github.com/inhere/php-librarys/tree/php5) 分支(不再维护)
88
99
## 安装
1010

@@ -29,59 +29,87 @@ composer require inhere/library
2929
- 直接拉取
3030

3131
```
32-
git clone https://github.com/inhere/php-librarys.git
32+
git clone https://git.oschina.net/inhere/php-librarys.git // git@osc
33+
git clone https://github.com/inhere/php-librarys.git // github
3334
```
3435

3536
## 工具库列表
3637

37-
基础库:
38-
39-
- `Inhere\Library\Collections` 数据收集器. (数据收集/全局配置/语言包处理类)
40-
- `Inhere\Library\DI` 依赖注入容器,提供服务管理
41-
- `Inhere\Library\Files` 文件系统操作(文件(夹)读取,检查,创建);`json ini yml` 文件的扩展解析
42-
- `Inhere\Library\Helpers` 辅助类库(`string array object date url curl php format json`)
43-
- `Inhere\Library\Traits` 一些常用的traits(`ArrayAccess` `GetterSetterAccess` `SimpleAlias` `SimpleConfig` `SimpleEvent`)
44-
- `Inhere\Library\Utils` 一些独立的工具类(`autoloader logger`)
38+
- `Inhere\Library\Collections` 数据收集器. (数据收集/全局配置 管理)
39+
- `Inhere\Library\Components` 一些有用的组件(有些可能是提供思路参考)
40+
- `AopProxy.php` 简单的 AOP 实现
41+
- `DataProxy.php` 简单的数据访问代理实现
42+
- `ErrorHandler.php` 错误处理
43+
- `Language.php` 提供语言管理,语言包处理类
44+
- `MemcacheClient.php` 一个简单的memcache(d)封装
45+
- `Pipeline.php` 一个简单的Pipeline实现封装
46+
- **`Inhere\Library\DI`** 依赖注入容器,提供全局服务管理
47+
- `Inhere\Library\Files` 文件系统操作(文件(夹)读取,检查,创建);
48+
- `FileFinder.php` 文件查找
49+
- `Parsers/*` 常用的 `json ini yml` 文件解析工具封装
50+
- **`Inhere\Library\Helpers`** 涵盖了各个方面的辅助类库(`string array object date url curl php format json cli data env` ... ...)
51+
- `Inhere\Library\Traits` 各种常用的traits(`ArrayAccess` `GetterSetterAccess` `SimpleAlias` `SimpleConfig` `SimpleEvent` ... ...)
52+
- `Inhere\Library\Utils` 一些独立的工具类(`autoloader logger token uuid` ... ...)
53+
- `Inhere\Library\Web` web相关工具类(`session cookie Environment ViewRenderer`)
4554
- `functions.php` 一些有用的函数
4655

47-
已迁移至 `inhere/library-plus`:
56+
已迁移至 `inhere/library-plus` (主要是一些不常用的、测试性的功能库):
4857

58+
- `Inhere\Library\auth` 用户认证管理,权限检查实现参考
4959
- `Inhere\Library\env` 环境信息收集, `Server`: 服务端信息. `Client`: 客户端信息
50-
- `Inhere\Library\event` 事件调度器
51-
- `Inhere\Library\Files` 文件系统操作(文件(夹)读取,检查,创建);文件上传/下载,图片处理(缩略图/水印),图片验证码生成
60+
- `Inhere\Library\Files` 文件系统功能扩展。 文件系统操作(文件(夹)读取,检查,创建);文件上传/下载,图片处理(缩略图/水印),图片验证码生成
5261
- `Inhere\Library\asset` 资源(css,js)管理,加载,发布
5362
- `Inhere\Library\html` html 元素创建, dom 创建
5463
- `Inhere\Library\network` network 工具库(`telnet`)
55-
- `Inhere\Library\Utils` 一些独立的工具类(`memcache`)
5664

5765
[Document](doc/document.md)
5866

5967
## 已独立的工具库
6068

61-
### `inhere/console` [github](https://github.com/inhere/php-console) [git@osc](https://git.oschina.net/inhere/php-console)
69+
### `inhere/validate` [github](https://github.com/inhere/php-validate) [git@osc](https://git.oschina.net/inhere/php-validate)
6270

63-
轻量级的命令行应用,工具库
71+
一个简洁小巧且功能完善的php验证库。仅有几个文件,无依赖。
6472

65-
### `inhere/queue` [github](https://github.com/inhere/php-queue) [git@osc](https://git.oschina.net/inhere/php-queue)
73+
### `inhere/event` [github](https://github.com/inhere/php-event-manager) [git@osc](https://git.oschina.net/inhere/php-event-manager)
6674

67-
php的队列使用包装(`DbQueue` `LevelDbQueue` `PhpQueue` `RedisQueue` `ShmQueue` `SSDBQueue` `SysVQueue`)
75+
php事件管理器,事件调度器 psr-14实现
6876

6977
### `inhere/http` [github](https://github.com/inhere/php-http) [git@osc](https://git.oschina.net/inhere/php-http)
7078

79+
php http消息库, 实现psr7 http消息接口
80+
81+
### `inhere/http-client` [github](https://github.com/inhere/php-http-client) [git@osc](https://git.oschina.net/inhere/php-http-client)
82+
7183
http 工具库(`request` 请求 `response` 响应 `curl` curl请求库,有简洁、完整和并发请求三个版本的类)
7284

73-
命令行应用 - 控制台的交互.
85+
### `inhere/queue` [github](https://github.com/inhere/php-queue) [git@osc](https://git.oschina.net/inhere/php-queue)
86+
87+
php的队列实现,使用包装(`DbQueue` `LevelDbQueue` `PhpQueue` `RedisQueue` `ShmQueue` `SSDBQueue` `SysVQueue`)
88+
89+
### 更多
90+
91+
- [inhere/php-lock](https://github.com/inhere/php-lock) php 锁实现
92+
- [inhere/php-shared-memory](https://github.com/inhere/php-shared-memory) php 共享内存操作实现
7493

7594
## 我的其他项目
7695

96+
### `inhere/console` [github](https://github.com/inhere/php-console) [git@osc](https://git.oschina.net/inhere/php-console)
97+
98+
轻量级的命令行应用,工具库, 控制台交互.
99+
77100
### srouter [github](https://github.com/inhere/php-srouter) [git@osc](https://git.oschina.net/inhere/php-srouter)
78101

79-
轻量级但功能丰富的单文件路由.
80-
102+
轻量级且快速的路由器实现.
103+
104+
### php-server [github](https://github.com/inhere/php-server) [git@osc](https://git.oschina.net/inhere/php-server)
105+
106+
基于 swoole 的server实现, 方便快速的构建和管理自己的 swoole 服务器
107+
81108
### php-gearman-manager [github](https://github.com/inhere/php-gearman-manager) [git@osc](https://git.oschina.net/inhere/php-gearman-manager)
82109

83110
php 的 gearman workers 管理工具。同时启动并管理多个gearman worker,并会监控运行状态。可以自定义worker数量,也可以针对job设置worker数量。还可以让worker专注指定的job
84111

85-
### php-server [github](https://github.com/inhere/php-server) [git@osc](https://git.oschina.net/inhere/php-server)
86112

87-
基于 swoole 的server实现
113+
## license
114+
115+
MIT

doc/sprintf.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# sprintf(format,arg1,arg2,arg++)
2+
3+
```php
4+
sprintf($format, $arg1, $arg2, $arg++)
5+
```
6+
7+
- `$format`
8+
9+
必需。规定字符串以及如何格式化其中的变量。
10+
11+
可能的格式值:
12+
13+
```
14+
%% - 返回一个百分号 %
15+
%b - 二进制数
16+
%c - ASCII 值对应的字符
17+
%d - 包含正负号的十进制数(负数、0、正数)
18+
%e - 使用小写的科学计数法(例如 1.2e+2)
19+
%E - 使用大写的科学计数法(例如 1.2E+2)
20+
%u - 不包含正负号的十进制数(大于等于 0)
21+
%f - 浮点数(本地设置)
22+
%F - 浮点数(非本地设置)
23+
%g - 较短的 %e 和 %f
24+
%G - 较短的 %E 和 %f
25+
%o - 八进制数
26+
%s - 字符串
27+
%x - 十六进制数(小写字母)
28+
%X - 十六进制数(大写字母)
29+
```
30+
31+
附加的格式值。必需放置在 `%` 和字母之间(例如 `%.2f`):
32+
33+
```
34+
+ (在数字前面加上 + 或 - 来定义数字的正负性。默认情况下,只有负数才做标记,正数不做标记)
35+
' (规定使用什么作为填充,默认是空格。它必须与宽度指定器一起使用。例如:%'x20s(使用 "x" 作为填充))
36+
- (左调整变量值)
37+
[0-9] (规定变量值的最小宽度)
38+
.[0-9] (规定小数位数或最大字符串长度)
39+
```
40+
41+
> 注释:如果使用多个上述的格式值,它们必须按照以上顺序使用。

src/Collections/SimpleCollection.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
namespace Inhere\Library\Collections;
77

8-
98
/**
109
* Collection
1110
* This class provides a common interface used by many other

src/Traits/MiddlewareAwareTrait.php

Lines changed: 0 additions & 132 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Time: 下午11:14
77
*/
88

9-
namespace Inhere\Library\Components;
9+
namespace Inhere\Library\Web;
1010

1111
use Inhere\Library\Collections\SimpleCollection;
1212

0 commit comments

Comments
 (0)