public function getSubstitutedDomain()
    {
        $currentHost = $_SERVER['HTTP_HOST'];

        // If there are wildcards in the primary domain (not recommended), make some
        // educated guesses about what to replace them with:
        $domain = preg_replace('/\.\*$/', ".{$currentHost}", $this->Domain);

        // Default to "subsite." prefix for first wildcard
        // TODO Whats the significance of "subsite" in this context?!
        $domain = preg_replace('/^\*\./', "subsite.", $domain);

        // *Only* removes "intermediate" subdomains, so 'subdomain.www.domain.com' becomes 'subdomain.domain.com'
        $domain = str_replace('.www.', '.', $domain);

        return $domain;
    }
public function getSubstitutedDomain()
    {
        $currentHost = $_SERVER['HTTP_HOST'];

        // If there are wildcards in the primary domain (not recommended), make some
        // educated guesses about what to replace them with:
        $domain = preg_replace('/\.\*$/', ".{$currentHost}", $this->Domain);

        // Default to "subsite." prefix for first wildcard
        // TODO Whats the significance of "subsite" in this context?!
        $domain = preg_replace('/^\*\./', "subsite.", $domain);

        // *Only* removes "intermediate" subdomains, so 'subdomain.www.domain.com' becomes 'subdomain.domain.com'
        $domain = str_replace('.www.', '.', $domain);

        return $domain;
    }
public function getSubstitutedDomain ( ) { $ currentHost = $ _SERVER [ 'HTTP_HOST' ] ; // If there are wildcards in the primary domain (not recommended), make some // educated guesses about what to replace them with: $ domain = preg_replace ( '/\.\*$/' , ".{$currentHost}" , $ this -> Domain ) ; // Default to "subsite." prefix for first wildcard // TODO Whats the significance of "subsite" in this context?! $ domain = preg_replace ( '/^\*\./' , "subsite." , $ domain ) ; // *Only* removes "intermediate" subdomains, so 'subdomain.www.domain.com' becomes 'subdomain.domain.com' $ domain = str_replace ( '.www.' , '.' , $ domain ) ; return $ domain ; }
Retrieves domain name with wildcards substituted with actual values

@todo Refactor domains into separate wildcards / primary domains

@return string
Retrieves domain name with wildcards substituted with actual values