PHP Classes

Simple PHP Collection: Manage collections of values using array iterators

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 72 All time: 10,240 This week: 34Up
Version License PHP version Categories
simple-collection 1.0MIT/X Consortium ...7Data types, PHP 7
Description 

Author

This package can manage collections of values using array iterators.

It provides a base collection interface definition with functions to perform several operations with collections like:

- Adding new elements

- Setting and getting element values

- Search for elements by value

- Check if the collection has an element with a given key

- Check if the collection has an element with a given value

- Update the collection with new values

- Return the values of all elements of the collection

- Convert the collection into a PHP array

The package also provides an implementation class that uses PHP arrays to implement the collection interface.

Picture of Chun-Sheng, Li
  Performance   Level  
Name: Chun-Sheng, Li <contact>
Classes: 37 packages by
Country: Taiwan Taiwan
Age: 31
All time rank: 21046 in Taiwan Taiwan
Week rank: 4 Up1 in Taiwan Taiwan Up
Innovation award
Innovation award
Nominee: 17x

Winner: 1x

Documentation

Simple Collection for PHP 7.1+

Gitter Build Status CodeFactor Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads License

Installation

composer require sunrise/collection

How to use

use Sunrise\Collection\Collection;

$payload = new Collection($_POST);

$payload->get('key', 'default');

Api documentation

https://phpdoc.fenric.ru/


  Files folder image Files (11)  
File Role Description
Files folder imagesrc (2 files)
Files folder imagetests (1 file)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file renovate.json Data Auxiliary data

  Files folder image Files (11)  /  src  
File Role Description
  Plain text file Collection.php Class Class source
  Plain text file CollectionInterface.php Class Class source

  Files folder image Files (11)  /  tests  
File Role Description
  Plain text file CollectionTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:72
This week:0
All time:10,240
This week:34Up