public function getHost()
{
if (isset($this->env['HTTP_HOST'])) {
if (strpos($this->env['HTTP_HOST'], ':') !== false) {
$r = explode(':', $this->env['HTTP_HOST'], 2);
return $r[0];
}
return $this->env['HTTP_HOST'];
}
return $this->env['SERVER_NAME'];
}