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 UriBuilder, but a must have is 'lang'.

$bUseAbsolutePath

boolean

Flag to create absolute Urls

$aConfig

array

If not set, UriBuilderConfig::getConfig() will be used by the UriBuilder

Exceptions

\cInvalidArgumentException if the given params do not contain the lang

Returns

stringThe Url build by UriBuilder

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 UriBuilder, but a must have is 'lang'.

$aConfig

array

If not set, UriBuilderConfig::getConfig() will be used by the UriBuilder

Returns

stringThe redirect Url build by UriBuilder

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
Static

Returns

Returns UriBuilder instance.

getUriBuilder() : \cUriBuilder

Returns

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", ... - "/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.

__construct() 

Is not callable from outside. Gets the UriBuilder configuration and creates an UriBuilder instance.

 Properties

 

$_instance : \Contenido_Url
 

$_oUriBuilder : \Contenido_UriBuilder
 

$_sUriBuilderName : string