function Collection::map

Same name in this branch

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

1 method overrides Collection::map()
ArrayCollection::map in drupal/core/vendor/doctrine/common/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

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Collections/Collection.php, line 208

Class

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

Namespace

Doctrine\Common\Collections

Code

function map(Closure $func);