/** * Returns the rating entity associated with the stats * * @return Rating */ public function getRating() { if ($this->ratingEntity === null) { $this->ratingEntity = Rating::factory(parent::getRating()); } return $this->ratingEntity; }