/** * @return User */ public function getUser() { if (is_null($this->user)) { $this->user = UserRepository::getUserById($this->user_id); } return $this->user; }