function _Course::equals
Search API
4.x _Course.php | _Course::equals(Course $course_c = null) |
5.x _Course.php | _Course::equals(Course $course_c = null) |
Convienience function. Simply compare the course_id of another course to $this to see if they are equal.
This is also used by CourseList and ObjList to determine matches.
Usage: if ($newCourse.equals($otherCourse)) { ... }
Parameters
Course $course_c:
Return value
bool
1 call to _Course::equals()
- _Course::equals_placeholder in classes/
_Course.php - Basically, this is a comparator function that will return true if $this equals many of the attributes of $course_c. Useful for seeing if $this is an "instance of" a particular course, but not necessairily the course that the student took. …
File
- classes/
_Course.php, line 702
Class
Code
function equals(Course $course_c = null)
{
if ($this->course_id == $course_c->course_id)
{
return true;
}
return false;
}