You are here

public function Collection::contains in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php \Doctrine\Common\Collections\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.

2 methods override Collection::contains()
AbstractLazyCollection::contains in vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php
Checks whether an element is contained in the collection. This is an O(n) operation, where n is the size of the collection.
ArrayCollection::contains in vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php
Checks whether an element is contained in the collection. This is an O(n) operation, where n is the size of the collection.

File

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

Class

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

Namespace

Doctrine\Common\Collections

Code

public function contains($element);