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

Other Useful Business Software
Easily Host LLMs and Web Apps on Cloud Run Icon
Easily Host LLMs and Web Apps on Cloud Run

Run everything from popular models with on-demand NVIDIA L4 GPUs to web apps without infrastructure management.

Run frontend and backend services, batch jobs, host LLMs, and queue processing workloads without the need to manage infrastructure. Cloud Run gives you on-demand GPU access for hosting LLMs and running real-time AI—with 5-second cold starts and automatic scale-to-zero so you only pay for actual usage. New customers get $300 in free credit to start.
Try Cloud Run 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