You are here

public function Collection::forAll in Plug 7

Tests whether the given predicate p holds for all elements of this collection.

Parameters

Closure $p The predicate.:

Return value

boolean TRUE, if the predicate yields TRUE for all elements, FALSE otherwise.

2 methods override Collection::forAll()
AbstractLazyCollection::forAll in lib/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php
Tests whether the given predicate p holds for all elements of this collection.
ArrayCollection::forAll in lib/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php
Tests whether the given predicate p holds for all elements of this collection.

File

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

Class

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

Namespace

Doctrine\Common\Collections

Code

public function forAll(Closure $p);