NationalCloud
in package
Class NationalCloud
Defines Graph hosts for the various national clouds
Tags
Table of Contents
- CHINA = "https://microsoftgraph.chinacloudapi.cn"
- GERMANY = "https://graph.microsoft.de"
- GLOBAL = "https://graph.microsoft.com"
- US_DOD = "https://dod-graph.microsoft.us"
- US_GOV = "https://graph.microsoft.us"
- $hosts : array<string|int, mixed>
- Unique hostnames from constant values [graph.microsoft.com, graph.microsoft.us, ...]
- containsNationalCloudHost() : bool
- Checks if url contains a valid National Cloud host
- containsNationalCloudHostFromUrlParts() : bool
- Checks if $urlParts contain a valid National Cloud host
- initHosts() : void
- Extracts hostnames from constant values to an array with unique keys for optimal lookup
Constants
CHINA
public
mixed
CHINA
= "https://microsoftgraph.chinacloudapi.cn"
GERMANY
public
mixed
GERMANY
= "https://graph.microsoft.de"
GLOBAL
public
mixed
GLOBAL
= "https://graph.microsoft.com"
US_DOD
public
mixed
US_DOD
= "https://dod-graph.microsoft.us"
US_GOV
public
mixed
US_GOV
= "https://graph.microsoft.us"
Properties
$hosts
Unique hostnames from constant values [graph.microsoft.com, graph.microsoft.us, ...]
private
static array<string|int, mixed>
$hosts
= []
Methods
containsNationalCloudHost()
Checks if url contains a valid National Cloud host
public
static containsNationalCloudHost(string $url) : bool
Parameters
- $url : string
Return values
bool —containsNationalCloudHostFromUrlParts()
Checks if $urlParts contain a valid National Cloud host
public
static containsNationalCloudHostFromUrlParts(array<string, string>|false $urlParts) : bool
Parameters
- $urlParts : array<string, string>|false
-
return value of parse_url()
Return values
bool —initHosts()
Extracts hostnames from constant values to an array with unique keys for optimal lookup
private
static initHosts() : void