承接 cakephp/collection 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cakephp/collection

最新稳定版本:5.3.0-RC2

Composer 安装命令:

composer require cakephp/collection

包简介

Work easily with arrays and iterators by having a battery of utility traversal methods

README 文档

README

Total Downloads License

CakePHP Collection Library

The collection classes provide a set of tools to manipulate arrays or Traversable objects. If you have ever used underscore.js, you have an idea of what you can expect from the collection classes.

Usage

Collections can be created using an array or Traversable object. A simple use of a Collection would be:

use Cake\Collection\Collection;

$items = ['a' => 1, 'b' => 2, 'c' => 3];
$collection = new Collection($items);

// Create a new collection containing elements
// with a value greater than one.
$overOne = $collection->filter(function ($value, $key, $iterator) {
    return $value > 1;
});

The Collection\CollectionTrait allows you to integrate collection-like features into any Traversable object you have in your application as well.

Documentation

Please make sure you check the official documentation

统计信息

  • 总下载量: 9.72M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 95
  • 点击次数: 1
  • 依赖项目数: 15
  • 推荐数: 2

GitHub 信息

  • Stars: 89
  • Watchers: 29
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-24