Class ServerUrl

Summary

Fully Qualified Name: Zend\View\Helper\ServerUrl
Extends: AbstractHelper

Description

Helper for returning the current server URL (optionally with request URI)

Methods

Name Description Defined By
__invoke() View helper entry point: Returns the current host's URL like http://site.com ServerUrl
getHost() Returns host ServerUrl
getPort() Retrieve the server port ServerUrl
getScheme() Returns scheme (typically http or https) ServerUrl
getView() Get the view object AbstractHelper
setHost() Sets host ServerUrl
setPort() Set server port ServerUrl
setScheme() Sets scheme (typically http or https) ServerUrl
setUseProxy() Set flag indicating whether or not to query proxy servers ServerUrl
setView() Set the View object AbstractHelper

Method Details

__invoke()

View helper entry point: Returns the current host's URL like http://site.com

Parameter Name Type Description
$requestUri string|bool [optional]

Returns: string

getHost()

Returns host

Returns: string

getPort()

Retrieve the server port

Returns: int|null

getScheme()

Returns scheme (typically http or https)

Returns: string

getView()

Get the view object

Returns: null|\Renderer

setHost()

Sets host

Parameter Name Type Description
$host string

Returns: \ServerUrl

setPort()

Set server port

Parameter Name Type Description
$port int

Returns: \ServerUrl

setScheme()

Sets scheme (typically http or https)

Parameter Name Type Description
$scheme string

Returns: \ServerUrl

setUseProxy()

Set flag indicating whether or not to query proxy servers

Parameter Name Type Description
$useProxy bool

Returns: \ServerUrl

setView()

Set the View object

Parameter Name Type Description
$view \Renderer

Returns: \AbstractHelper

Top