mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Merge pull request #13461 from appwrite/CLO-4796-usage-context-getters
feat(usage): expose the remaining Context dimension getters
This commit is contained in:
1 file changed
+25
@@ -122,6 +122,11 @@ class Context
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCountry(): string
|
||||
{
|
||||
return $this->country;
|
||||
}
|
||||
|
||||
public function setRegion(string $region): static
|
||||
{
|
||||
$this->region = $region;
|
||||
@@ -152,12 +157,22 @@ class Context
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getHostname(): string
|
||||
{
|
||||
return $this->hostname;
|
||||
}
|
||||
|
||||
public function setUserAgent(string $userAgent): static
|
||||
{
|
||||
$this->userAgent = $userAgent;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getUserAgent(): string
|
||||
{
|
||||
return $this->userAgent;
|
||||
}
|
||||
|
||||
public function setIp(string $ip): static
|
||||
{
|
||||
$this->ip = $ip;
|
||||
@@ -175,12 +190,22 @@ class Context
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSdk(): string
|
||||
{
|
||||
return $this->sdk;
|
||||
}
|
||||
|
||||
public function setSdkVersion(string $sdkVersion): static
|
||||
{
|
||||
$this->sdkVersion = $sdkVersion;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSdkVersion(): string
|
||||
{
|
||||
return $this->sdkVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a metric with the metadata active at the time it was emitted.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user