function ObjList::find_all_matches

6.x ObjList.php ObjList::find_all_matches(stdClass $obj_c)
4.x ObjList.php ObjList::find_all_matches($obj_c)
5.x ObjList.php ObjList::find_all_matches(stdClass $obj_c)

File

classes/ObjList.php, line 147

Class

ObjList

Code

function find_all_matches($obj_c) 
 {
  // This will find all the matches of objC in the
  // array, and return an ObjList of matches.
  $rtn = new ObjList();
  $bool_no_matches = true;
  for ($t = 0; $t < $this->count; $t++) 
   {
    if ($this->array_list [$t]->equals($obj_c)) 
     {
      $rtn->add($this->array_list [$t]);
      $bool_no_matches = false;
    }
  }

  if ($bool_no_matches == false) 
   {
    return $rtn;
  }
  else {
    return false;
  }

}