public function AbstractLazyCollection::filter in Plug 7
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
- lib/
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);
}