ivopetkov/data-object
最新稳定版本:v1.13.0
Composer 安装命令:
composer require ivopetkov/data-object
包简介
A familiar and powerful data object abstraction for PHP
README 文档
README
A familiar and powerful Data Object abstraction for PHP.
Usage
Create an objects list from array:
use \IvoPetkov\DataList; $data = [ ['value' => 'a'], ['value' => 'b'], ['value' => 'c'] ]; $list = new DataList($data); // Can access the objects by index and get properties the following ways echo $list[0]->value; // Output: a echo $list[1]->value; // Output: b // Can loop through the objects foreach($list as $object){ echo $object->value; }
And here are same helpful methods to modify the list:
use \IvoPetkov\DataList; $list = new DataList([...]); $list ->filterBy('property1', '...') ->sortBy('property2') ->map(function($object){});
Install via Composer
composer require ivopetkov/data-object
Documentation
Full documentation is available as part of this repository.
License
This project is licensed under the MIT License. See the license file for more information.
Contributing
Feel free to open new issues and contribute to the project. Let's make it awesome and let's do in a positive way.
Authors
This library is created and maintained by Ivo Petkov (ivopetkov.com) and some awesome folks.
统计信息
- 总下载量: 8.13k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 10
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-13