Add methods found in Doctrine collections and others. For instance:
// iterate over everything that meets given criteria
// could be called all, each, forEach, or forAll
// optionally may pass in an object to bind to (to give callback
$coll->each(function($elem, $key, $iter){ return true }, $newThis);
// iterate until (iterates until it hits a true)
$coll->until($callback)
// opposite (iterates while callback returns true, first time it hits a false, stop)
$coll->while($callback)
Add methods found in Doctrine collections and others. For instance: