__invoke()
getHost()
getPort()
getScheme()
getView()
setHost()
setPort()
setScheme()
setUseProxy()
setView()
detectHost()
detectPort()
detectScheme()
setHostFromProxy()
setPortFromProxy()
setSchemeFromProxy()
$host
$port
$scheme
$useProxy
$view
Helper for returning the current server URL (optionally with request URI)
__invoke(string | bool $requestUri) : string
stringbool
[optional] if true, the request URI found in $_SERVER will be appended as a path. If a string is given, it will be appended as a path. Default is to not append any path.
string
server urlgetHost() : string
string
hostgetPort() : int | null
int
null
getScheme() : string
string
scheme (typically http or https)getView() : null | \Zend\View\Renderer\RendererInterface
inherited_from | \Zend\View\Helper\AbstractHelper::getView() |
---|
setScheme(string $scheme) : \Zend\View\Helper\ServerUrl
string
new scheme (typically http or https)
\Zend\View\Helper\ServerUrl
fluent interface, returns selfsetUseProxy(bool $useProxy) : \Zend\View\Helper\ServerUrl
setView(\Zend\View\Renderer\RendererInterface $view) : \Zend\View\Helper\AbstractHelper
inherited_from | \Zend\View\Helper\AbstractHelper::setView() |
---|
detectHost() : void
detectPort() : null
null
detectScheme() : null
null
setHostFromProxy() : bool
bool
setPortFromProxy() : bool
bool
setSchemeFromProxy() : bool
bool
$host : string
$port : int
$scheme : string
$useProxy : bool
$view : \Zend\View\Renderer\RendererInterface
inherited_from | \Zend\View\Helper\AbstractHelper::$$view |
---|