Collection::indexOf PHP Method

indexOf() public method

Tries to find the index number for the given element
public indexOf ( mixed $needle ) : mixed
$needle mixed the element to search for
return mixed the name of the key or false
    public function indexOf($needle)
    {
        return array_search($needle, array_values($this->data));
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 public function indexOf($element)
 {
     $this->initialize();
     return $this->coll->indexOf($element);
 }