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

category Zend
package Zend_View
subpackage Helper
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Constructor

__construct() : void

Returns host

getHost() : string

Returns

stringhost

Returns scheme (typically http or https)

getScheme() : string

Returns

stringscheme (typically http or https)

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

serverUrl(string|boolean $requestUri = null) : string

Parameters

$requestUri

stringboolean

[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.

Returns

stringserver url

Sets host

setHost(string $host) : \Zend_View_Helper_ServerUrl

Parameters

$host

string

new host

Returns

\Zend_View_Helper_ServerUrlfluent interface, returns self

Sets scheme (typically http or https)

setScheme(string $scheme) : \Zend_View_Helper_ServerUrl

Parameters

$scheme

string

new scheme (typically http or https)

Returns

\Zend_View_Helper_ServerUrlfluent interface, returns self

 Properties

 

Host (including port)

$_host : string

Default

 

Scheme

$_scheme : string

Default