public function AbstractLazyCollection::filter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php \Doctrine\Common\Collections\AbstractLazyCollection::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.
Overrides Collection::filter
File
- vendor/
doctrine/ collections/ lib/ Doctrine/ Common/ Collections/ AbstractLazyCollection.php, line 218
Class
- AbstractLazyCollection
- Lazy collection that is backed by a concrete collection
Namespace
Doctrine\Common\CollectionsCode
public function filter(Closure $p) {
$this
->initialize();
return $this->collection
->filter($p);
}