You are here

public function Collection::filter 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::filter()

Returns all the elements of this collection that satisfy the predicate p. The order of the elements is preserved.

Parameters

Closure $p The predicate used for filtering.:

Return value

Collection A collection with the results of the filter operation.

2 methods override Collection::filter()
AbstractLazyCollection::filter in vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php
Returns all the elements of this collection that satisfy the predicate p. The order of the elements is preserved.
ArrayCollection::filter in vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php
Returns all the elements of this collection that satisfy the predicate p. The order of the elements is preserved.

File

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

Class

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

Namespace

Doctrine\Common\Collections

Code

public function filter(Closure $p);