$value) { if (property_exists($this, $key)) { $this->{$key} = $value; } } } //인증 정보 public static function byAuthContext(AuthContext $authContext): self { return new self( [ 'isLogin' => $authContext->isLoggedIn(), 'uid' => $authContext->getUID(), 'name' => $authContext->getName(), 'role' => $authContext->getRole(), //배열(array|null)을 반환합니다. ] ); } }