Skip to content

marcelkohl/php-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maintenance GPLv3 license Ask Me Anything !

php-collection

This is a PHP collection implementation.

Why collections instead of arrays?

Collections and arrays are similar in that they both hold references to objects and they can be managed as a group.

The advantage in using collections is that the objects in a collection can represent specific structures (classes/interfaces) instead of having an array where developers have to guess what is inside.

Example

public function getAllCats(AnimalCollection $animals):CatCollection
{
  /** ... **/
}

About the implementation

This implementation covers the interfaces Countable, Iterator and ArrayAccess.

About

PHP collection implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages