MobileFrontend
MobileoptimisedfrontendforMediaWiki
MobileFrontend\WMFBaseDomainExtractor Class Reference

Utility class to find base domain for given host. More...

+ Inheritance diagram for MobileFrontend\WMFBaseDomainExtractor:
+ Collaboration diagram for MobileFrontend\WMFBaseDomainExtractor:

Public Member Functions

 getCookieDomain ( $server)
 Try to extract the WMF base domain from $server Returns $server if no WMF base domain is found. More...
 

Detailed Description

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.

See also
T148975

Member Function Documentation

◆ getCookieDomain()

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.

Parameters
string$serverURL
Returns
string Hostname

Implements MobileFrontend\BaseDomainExtractorInterface.


The documentation for this class was generated from the following file: