/** * returns an array with two positions: $array["username"] and $array["blogname"] as * extracted from the request. This method is static * * @static * @return an associative array */ function getSubdomainInfoFromRequest() { $config =& Config::getConfig(); $url = new Url($config->getValue("subdomains_base_url")); $lp = new LinkParser($url->getHost()); $server = HttpVars::getServer(); $httpHost = $server["HTTP_HOST"]; $result = $lp->parseLink($httpHost); return $result; }
/** * @return */ function identify() { foreach ($this->_formats as $key => $format) { $lp = new LinkParser($format); $params = $lp->parseLink($this->_request); if ($params) { // return the key assigned to the format that matched $this->_params = $params; return $key; } } }