\Anax\UrlCUrl

A helper to create urls.

Summary

Methods
Properties
Constants
create()
createRelative()
asset()
setSiteUrl()
setBaseUrl()
setStaticSiteUrl()
setStaticBaseUrl()
setScriptName()
setUrlType()
No public properties found
URL_CLEAN
URL_APPEND
No protected methods found
No protected properties found
N/A
No private methods found
$urlType
$siteUrl
$baseUrl
$scriptName
$staticSiteUrl
$staticBaseUrl
N/A

Constants

URL_CLEAN

URL_CLEAN

Properties

URL_APPEND

URL_APPEND

Properties

$urlType

$urlType : 

Type

$siteUrl

$siteUrl : 

Type

$baseUrl

$baseUrl : 

Type

$scriptName

$scriptName : 

Type

$staticSiteUrl

$staticSiteUrl : 

Type

$staticBaseUrl

$staticBaseUrl : 

Type

Methods

create()

create(string  $uri = null) : string

Create an url and prepending the baseUrl.

Parameters

string $uri

part of uri to use when creating an url. "" or null means baseurl to current frontcontroller.

Returns

string —

as resulting url.

createRelative()

createRelative(string  $uri = null) : string

Create an url and prepend the baseUrl to the directory of the frontcontroller.

Parameters

string $uri

part of uri to use when creating an url. "" or null means baseurl to directory of the current frontcontroller.

Returns

string —

as resulting url.

asset()

asset(string  $uri = null) : string

Create an url for a static asset.

Parameters

string $uri

part of uri to use when creating an url.

Returns

string —

as resulting url.

setSiteUrl()

setSiteUrl(string  $url) : $this

Set the siteUrl to prepend all absolute urls created.

Parameters

string $url

part of url to use when creating an url.

Returns

$this

setBaseUrl()

setBaseUrl(string  $url) : $this

Set the baseUrl to prepend all relative urls created.

Parameters

string $url

part of url to use when creating an url.

Returns

$this

setStaticSiteUrl()

setStaticSiteUrl(string  $url) : $this

Set the siteUrl to prepend absolute urls for assets.

Parameters

string $url

part of url to use when creating an url.

Returns

$this

setStaticBaseUrl()

setStaticBaseUrl(string  $url) : $this

Set the baseUrl to prepend relative urls for assets.

Parameters

string $url

part of url to use when creating an url.

Returns

$this

setScriptName()

setScriptName(string  $name) : $this

Set the scriptname to use when creating URL_APPEND urls.

Parameters

string $name

as the scriptname, for example index.php.

Returns

$this

setUrlType()

setUrlType(string  $type) : $this

Set the type of urls to be generated, URL_CLEAN, URL_APPEND.

Parameters

string $type

what type of urls to create.

Returns

$this