function Collection::filter

Same name in this branch

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.

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

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

Class

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

Namespace

Doctrine\Common\Collections

Code

function filter(Closure $p);