raidros/collection

A PHP collections for your classes

This package's canonical repository appears to be gone and the package has been frozen as a result.

2.4.0 2016-08-27 03:57 UTC

This package is not auto-updated.

Last update: 2021-02-19 23:45:35 UTC


README

Latest Version on Packagist Software License Build Status StyleCI Coverage Status Quality Score SensioLabsInsight Total Downloads

Collection help you to build your object collections more easily.

Install

Via Composer

$ composer require raidros/collection

Usage

$collection = new Raidros\Collection\Collection;

// Adding items to collection
$collection->put('something', new DummyClass);
$collection->put('another.something', new AnotherDummyClass);

// Getting all items stored on collection
$items = $collection->all();

// Finding one specific item on collection by name
$item = $collection->find('something');

Please see the Wiki for more information.

License

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