/** * @deprecated */ public static function fromParams(UrlParams $params) { if ($params->has('service') && $params->has('host')) { return new Service(MonitoringBackend::instance(), $params->get('host'), $params->get('service')); } elseif ($params->has('host')) { return new Host(MonitoringBackend::instance(), $params->get('host')); } return null; }
/** * Return a url's query parameter if it exists, otherwise $default * * @param string $param A query parameter name to return if existing * @param mixed $default A value to return when the parameter doesn't exist * * @return mixed */ public function getParam($param, $default = null) { return $this->params->get($param, $default); }