MobileFrontend
MobileoptimisedfrontendforMediaWiki
|
Utility class to find base domain for given host. More...
Public Member Functions | |
getCookieDomain ( $server) | |
Try to extract the WMF base domain from $server Returns $server if no WMF base domain is found. More... | |
Utility class to find base domain for given host.
This class contains a hardcoded list of all WMF hosts and WMF specific domain logic. As we never experienced any bug requests from users and we do not change domains too often there is no need to put that hosts list into settings.
MobileFrontend\WMFBaseDomainExtractor::getCookieDomain | ( | $server | ) |
Try to extract the WMF base domain from $server Returns $server if no WMF base domain is found.
Although some browsers will accept cookies without the initial . in domain RFC 2109 requires it to be included.
$server must be a valid URL (i.e. with the scheme included, http or https or protocol-relative e.g. //en.m.wikipedia.org'). NULL and empty strings can also be taken but will return NULL or empty string respectively.
string | $server | URL |
Implements MobileFrontend\BaseDomainExtractorInterface.