Methods

Creates a URL to frontend page.

build(mixed $param, boolean $bUseAbsolutePath, array $aConfig) : string

Parameters

$param

mixed

Either url or assoziative array containing parameter: - url: front_content.php?idcat=12&lang=1 - params: array('idcat' => 12, 'lang' => 1) Required values depend on used UrlBuilder, but a must have is 'lang'.

$bUseAbsolutePath

boolean

Flag to create absolute Urls

$aConfig

array

If not set, UrlBuilderConfig::getConfig() will be used by the URLBuilder

Returns

stringThe Url build by UrlBuilder

Creates a URL used to redirect to frontend page.

buildRedirect(mixed $param, array $aConfig) : string

Parameters

$param

mixed

Either url or assoziative array containing parameter: - url: front_content.php?idcat=12&lang=1 - params: array('idcat' => 12, 'lang' => 1) Required values depend on used UrlBuilder, but a must have is 'lang'.

$aConfig

array

If not set, UrlBuilderConfig::getConfig() will be used by the URLBuilder

Returns

stringThe redirect Url build by UrlBuilder

Composes a url using passed components array

composeByComponents(array $aComponents) : string

Parameters

$aComponents

array

Assoziative array created by parse_url()

Returns

string$sUrl The composed Url

Returns self instance

getInstance() : \Contenido_Url

Returns

Returns UrlBuilder instance.

getUrlBuilder() : \Contenido_UrlBuilder

Checks, if passed url is an external url while performing hostname check

isExternalUrl(string $sUrl) : bool

Parameters

$sUrl

string

Url to check

Returns

boolTrue if url is a external url, otherwhise false

Checks, if passed url is an identifiable internal url.

isIdentifiableFrontContentUrl(string $sUrl) : bool

Following urls will be identified as a internal url: - "/", "/?idart=123", "/?idcat=123", ... - "front_content.php", "front_content.php?idart=123", "front_content.php?idcat=123", ... - The path component of an client HTML base path: e. g. "/cms/", "/cms/?idart=123", "/cms/?idcat=123" - Also possible: "/cms/front_content.php", "/cms/front_content.php?idart=123", "/cms/front_content.php?idcat=123" All of them prefixed with protocol and client host (e. g. http://host/) will also be identified as a internal Url.

Other Urls, even internal Urls like /unknown/path/to/some/page.html will not be identified as internal url event if they are real working clean URLs.

Parameters

$sUrl

string

Url to check

Returns

boolTrue if url is identifiable internal url, otherwhise false

Splits passed url into its components

parse(string $sUrl) : array

Parameters

$sUrl

string

The Url to strip down

Returns

arrayAssoziative array created by using parse_url() having the key 'params' which includes the parameter value pairs.

Constructor of Contenido_Url. Is not callable from outside.

__construct() 

Gets the UrlBuilder configuration and creates an UrlBuilder instance.

 Properties

 

Self instance.

$_instance : \Contenido_Url

 

UrlBuilder instance.

$_oUrlBuilder : \Contenido_UrlBuilder

 

UrlBuilder name.

$_sUrlBuilderName : string