Processes a relative URL to a resource, and convert it so that it is accessible on the client templates.
The relative url may be relative to the client or the server base Url. Whenever possible, the returned URL will be relative to the cartoclient. The relative URL is possible if the $forceAbsolute parameter is false and the resource is on the client or directAccess is enabled.
Tags:
return:
A relative URL to the resource if possible, or an absolute one
access:
public
Parameters:
string
$relativeUrl
The relative URL to a resource to convert
boolean
$client
True for resources on the client, false for server
Returns an URL to access files inside the directory of generated files (like generated mapserver images, pdf files, ...) This can be used for server or client resources.
Tags:
access:
public
Parameters:
string
$resource
the resource to access (this is the resource name relative to the directory of generated files (www-data usually))
From a relative resource URL, returns either a path to the corresponding file on the file system, if accessible (only for client resources, or server in direct access mode). Otherwise, it will return the absolute URL to the resource.
Tags:
return:
The path to the resource file on the filesystem, if accessible, or the absolute URL to the resource
access:
public
Parameters:
string
$relativeUrl
The relative URL to a resource
boolean
$client
True for resources on the client, false for server