public function Collection::indexOf in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php \Doctrine\Common\Collections\Collection::indexOf()
Gets the index/key of a given element. 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.
Parameters
mixed $element The element to search for.:
Return value
int|string|bool The key/index of the element or FALSE if the element was not found.
2 methods override Collection::indexOf()
- AbstractLazyCollection::indexOf in vendor/
doctrine/ collections/ lib/ Doctrine/ Common/ Collections/ AbstractLazyCollection.php - Gets the index/key of a given element. 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.
- ArrayCollection::indexOf in vendor/
doctrine/ collections/ lib/ Doctrine/ Common/ Collections/ ArrayCollection.php - Gets the index/key of a given element. 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
- vendor/
doctrine/ collections/ lib/ Doctrine/ Common/ Collections/ Collection.php, line 248
Class
- Collection
- The missing (SPL) Collection/Array/OrderedMap interface.
Namespace
Doctrine\Common\CollectionsCode
public function indexOf($element);