public function GetSiteStatus($format) { //Check for unsupported representations $fmt = $this->ValidateRepresentation($format, array("xml", "json")); $sessionId = $this->app->request->params("session"); try { $this->EnsureAuthenticationForSite($sessionId, false, $this->GetMimeTypeForFormat($format)); $admin = new MgServerAdmin(); $admin->Open($this->userInfo); $status = $admin->GetSiteStatus(); $mimeType = MgMimeType::Xml; if ($fmt === "json") { $mimeType = MgMimeType::Json; } $this->OutputMgPropertyCollection($status, $mimeType); } catch (MgException $ex) { $this->OnException($ex, $this->GetMimeTypeForFormat($format)); } }