function Collection::contains

Checks whether an element is contained in the collection. This is an O(n) operation, where n is the size of the collection.

Parameters

mixed $element The element to search for.:

Return value

boolean TRUE if the collection contains the element, FALSE otherwise.

1 method overrides Collection::contains()
ArrayCollection::contains in drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Collections/ArrayCollection.php
Checks whether the given element is contained in the collection. Only element values are compared, not keys. The comparison of two elements is strict, that means not only the value but also the type must match. For objects this means reference equality.

File

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

Class

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

Namespace

Doctrine\Common\Collections

Code

function contains($element);