Documentation

NationalCloud
in package

Class NationalCloud

Defines Graph hosts for the various national clouds

Tags
copyright

2021 Microsoft Corporation

license

https://opensource.org/licenses/MIT MIT License

link
https://developer.microsoft.com/graph

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"

US_DOD

public mixed US_DOD = "https://dod-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
Return values
void

Search results