jjgrainger / Collection

A PHP Collection class for working with arrays

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collection v1.1

A collection class for working with arrays

Build Status Total Downloads Latest Stable Version License

Principles

  • Immutable - Most methods return a new collection, leaving the previous untouched
  • Chainable - Methods can be chained to create fluent mapping and reduce original collection

Requirements

Installation

$ composer require jjgrainger/collection

Usage

$collection = new Collection([1, 2, 3]);

$total = $collection->sum(); // 6

Notes

Author

Joe Grainger

About

A PHP Collection class for working with arrays

License:MIT License


Languages

Language:PHP 100.0%