/** * Get the rating as an object * * @return titania_rating */ public function get_rating() { if ($this->rating) { return $this->rating; } $this->rating = new titania_rating('contrib', $this); $this->rating->load_user_rating(); if ($this->is_author || $this->is_active_coauthor || $this->is_coauthor) { $this->rating->cannot_rate = true; } return $this->rating; }