SilverStripe\MultiDomain\MultiDomain
A utility class that provides several static methods for parsing URLs and resolving hostnames.
- Author: Aaron Carlino <aaron@silverstripe.com>
Synopsis
class MultiDomain
extends Object
{
- // constants
- const KEY_PRIMARY = 'primary';
- // methods
- public static MultiDomainDomain domain_for_url()
- public static array get_all_domains()
- public static MultiDomainDomain get_primary_domain()
- public static MultiDomainDomain get_domain()
Hierarchy
Extends
- SilverStripe\Core\Object
Constants
Name | Value |
---|---|
KEY_PRIMARY | 'primary' |
Methods
public
- domain_for_url() — Given a url, get the domain that maps to it, e.g.
- get_all_domains() — Gets all the domains that have been configured
- get_domain() — Gets a domain by its key, e.g. 'org','com'
- get_primary_domain() — Gets the domain marked as "primary"