定制 easyframework/collections 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

easyframework/collections

最新稳定版本:v7.0.0

Composer 安装命令:

composer require easyframework/collections

包简介

Collections Abstraction library for PHP

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Downloads

Collections Abstraction library for PHP

The Collection library is one of the most useful things that many modern languages has, but for some reason PHP doesn't has a built in collection layer.

For that reason we created Collections, an incredible library that gathers the best of .NET's and Java's collections patterns and unify it with PHP array power.

Take a look and see what we're talking about!!

Install

composer require easyframework/collections

Usage

The Collection Class

The Collection represents the List in .NET language or simply non-associative arrays in php:

  $person1 = new \stdClass();
  $person1->name = 'John';
  $person1->age = 25;
  
  $person2 = new \stdClass();
  $person2->name = 'Maria';
  $person2->age = 30;
  
  $person3 = new \stdClass();
  $person3->name = 'Anderson';
  $person3->age = 15;
     
  $collection = new Collections\Vector();
  $collection->add($person1);
  $collection->add($person2);
  $collection->add($person3);
  
  $collection->filter(function($person){
        return $person->age > 18;
  })->each(function($item){
        echo $item->name; //John and Maria
  });

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.

Documentation

More information can be found in the online documentation at https://italolelis.gitbooks.io/collections.

统计信息

  • 总下载量: 294.74k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 64
  • 点击次数: 2
  • 依赖项目数: 19
  • 推荐数: 0

GitHub 信息

  • Stars: 62
  • Watchers: 8
  • Forks: 17
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固