You are here

public function AbstractLazyCollection::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

Overrides Collection::map

File

lib/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php, line 236

Class

AbstractLazyCollection
Lazy collection that is backed by a concrete collection

Namespace

Doctrine\Common\Collections

Code

public function map(Closure $func) {
  $this
    ->initialize();
  return $this->collection
    ->map($func);
}