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.
Signature
public function indexOf(mixed
$element )
Parameters
$element
— mixed- The element to search for.
Returns
- mixed
- The key/index of the element or FALSE if the element was not found.