function __construct(Action $out, Profile $profile) { parent::__construct($out); $this->profile = $profile; try { $this->user = $this->profile->getUser(); } catch (NoSuchUserException $e) { // The profile presented is non-local assert(!$this->profile->isLocal()); } }
function __construct($out, $group) { parent::__construct($out); $this->group = $group; }
function __construct($out, $group) { parent::__construct($out); $this->group = $group; $this->profile = $this->group->getProfile(); }
function __construct($out, $profile) { parent::__construct($out); $this->profile = $profile; $this->user = User::staticGet('id', $profile->id); }