function ObjList::object_index_of

7.x ObjList.php ObjList::object_index_of($obj_c)
6.x ObjList.php ObjList::object_index_of($obj_c)
4.x ObjList.php ObjList::object_index_of($obj_c)
5.x ObjList.php ObjList::object_index_of($obj_c)

File

classes/ObjList.php, line 68

Class

ObjList

Code

function object_index_of($obj_c) 
 {
  // This will return the array index of the exact object being requested.
  // Not the ->equals(), but rather an == of the object (the reference is the same)

  for ($t = 0; $t < count($this->array_list); $t++) 
   {
    if ($this->array_list [$t] == $obj_c) 
     {
      return $t;
    }
  }

  return -1;


}