ObjList::find_all_matches

5.x ObjList.php ObjList::find_all_matches(stdClass $obj_c)
4.x ObjList.php ObjList::find_all_matches($obj_c)
3 calls to ObjList::find_all_matches()
_CourseList::find_all_matches in classes/_CourseList.php
Using the parent's function of find_all_matches, this will return a CourseList of all courses which match the Course object.
_CourseList::find_most_recent_match in classes/_CourseList.php
Find a list of matches to Course courseC, which fulfill the min_grade requirement, ordered by most recently taken.
_CourseList::mark_repeats_exclude in classes/_CourseList.php
Go through the list and set the $bool_exclude_repeat flag to TRUE for all matches of $course in this list.
1 method overrides ObjList::find_all_matches()
_CourseList::find_all_matches in classes/_CourseList.php
Using the parent's function of find_all_matches, this will return a CourseList of all courses which match the Course object.

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;
  }

}