Doctrine Collections is a library that contains classes for working with arrays of data. Doctrine Collections provides an interface named Doctrine\Common\Collections\Collection that resembles the nature of a regular PHP array. That is, it is essentially an ordered map that can also be used like a list. A Collection has an internal iterator just like a PHP array. In addition, a Collection can be iterated with external iterators, which is preferable. To use an external iterator simply use the foreach language construct to iterate over the collection, which calls getIterator() internally, or explicitly retrieve an iterator though getIterator() which can then be used to iterate over the collection. You can not rely on the internal iterator of the collection being at a certain position unless you explicitly positioned it before.

Features

  • ArrayCollection filter now allows filtering by key, value or both
  • When using the ClosureExpressionVisitor over objects with a defined accessor and property, the accessor is prioritized
  • Updated testing tools and coding standards, autoloading, which also led to marginal performance improvements
  • Introduced generic type docblock declarations from psalm
  • This release bumps the minimum required PHP version to 7.1.3
  • A Collection has an internal iterator just like a PHP array

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Doctrine Collections

Doctrine Collections Web Site

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Doctrine Collections!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Libraries

Registered

2021-10-08