geographer
geographer copied to clipboard
[RFC] Re-use of doctrine collections
Your collection implementation looks similar to Doctrines
ArrayCollectionwith
ObjectRepository` ontop of it. What do you think about re-using some code from there?
https://github.com/doctrine/collections/blob/master/lib/Doctrine/Common/Collections/ArrayCollection.php
https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/Persistence/ObjectRepository.php
https://github.com/doctrine/collections/blob/master/lib/Doctrine/Common/Collections/Selectable.php
This could lead to some interoperability with other libraries.
You are right - nowadays most collection implementations are very similar (I've personally tried Laravel's, CakePHP's and Doctrine). I'll check - maybe I really should just import (probably extend) collection class from Doctrine or somewhere else
Laravel's collections can be used standalone with https://github.com/tightenco/collect