ID = $calendarRecord->UID; $this->Name = $calendarRecord->CustomName ?: $calendarRecord->Name; $this->Website = $calendarRecord->Website; $this->Image = $calendarRecord->CustomImageUrl; $this->Url = $calendarRecord->CustomUrl; $this->LastUpdated = $calendarRecord->LastUpdated; $this->GroupID = $calendarRecord->CategoryID; } public static function __compare(CalendarDTO $cal1, CalendarDTO $cal2) { return strcmp($cal1->Name, $cal2->Name); } } ?>