You are here

public function Collection::map in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php \Doctrine\Common\Collections\Collection::map()

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 vendor/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 vendor/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

vendor/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);