reekoheek / util
PHP通用工具库
1.3.0
2018-08-02 04:13 UTC
Requires
- reekoheek/jsonkit: ~1.0.0
Requires (Dev)
README
PHP通用工具库
集合
集合是一个包装关联数组的对象,类似于关联数组。
集合支持JSON序列化。请参阅JsonKit。
示例
use ROH\Util\Collection; // instantiate empty collection $collection = new Collection(); // instantiate filled collection $filledCollection = new Collection([ 'foo' => 'bar' ]); // define attribute $collection['subCollection'] = $filledCollection; // get foo of sub collection attribute from parent collection attribute echo $collection['subCollection']['foo'];
组合
组合一个可调用的/函数数组,稍后作为函数调用序列。
Inflector
屈折库
Injector
简单的依赖注入器
选项
从数组或配置文件中组合选项
StringFormatter
从字符串模板格式化字符串