You are here

public function Collection::map in Plug 7

Applies the given function to each element in the collection and returns a new collection with the elements returned by the function.

Parameters

Closure $func:

Return value

Collection

2 methods override Collection::map()
AbstractLazyCollection::map in lib/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php
Applies the given function to each element in the collection and returns a new collection with the elements returned by the function.
ArrayCollection::map in lib/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php
Applies the given function to each element in the collection and returns a new collection with the elements returned by the function.

File

lib/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php, line 225

Class

Collection
The missing (SPL) Collection/Array/OrderedMap interface.

Namespace

Doctrine\Common\Collections

Code

public function map(Closure $func);