Mapper::domain PHP Method

domain() public static method

public static domain ( )
    public static function domain()
    {
        $self = self::instance();
        if (is_null($self->domain)) {
            if (array_key_exists('REQUEST_URI', $_SERVER)) {
                $s = array_key_exists('HTTPS', $_SERVER) ? 's' : '';
                $self->domain = 'http' . $s . '://' . $_SERVER['HTTP_HOST'];
            } else {
                $self->domain = 'http://localhost';
            }
        }
        return $self->domain;
    }