IURLGenerator
Class to generate URLs
Tags
Table of Contents
- getAbsoluteURL() : string
- Makes an URL absolute
- getBaseUrl() : string
- imagePath() : string
- Returns the link to an image, like linkTo but only with prepending img/
- linkTo() : string
- Returns an URL for an image or file
- linkToDocs() : string
- linkToOCSRouteAbsolute() : string
- linkToRoute() : string
- Returns the URL for a route
- linkToRouteAbsolute() : string
- Returns the absolute URL for a route
Methods
getAbsoluteURL()
Makes an URL absolute
public
getAbsoluteURL(string $url) : string
Parameters
- $url : string
-
the url in the ownCloud host
Tags
Return values
string —the absolute version of the url
getBaseUrl()
public
getBaseUrl() : string
Tags
Return values
string —base url of the current request
imagePath()
Returns the link to an image, like linkTo but only with prepending img/
public
imagePath(string $appName, string $file) : string
Parameters
- $appName : string
-
the name of the app
- $file : string
-
the name of the file
Tags
Return values
string —the url
linkTo()
Returns an URL for an image or file
public
linkTo(string $appName, string $file[, array $args = array() ]) : string
Parameters
- $appName : string
-
the name of the app
- $file : string
-
the name of the file
- $args : array = array()
-
array with param=>value, will be appended to the returned url The value of $args will be urlencoded
Tags
Return values
string —the url
linkToDocs()
public
linkToDocs(string $key) : string
Parameters
- $key : string
Tags
Return values
string —url to the online documentation
linkToOCSRouteAbsolute()
public
linkToOCSRouteAbsolute(string $routeName[, array $arguments = [] ]) : string
Parameters
- $routeName : string
- $arguments : array = []
Tags
Return values
string —linkToRoute()
Returns the URL for a route
public
linkToRoute(string $routeName[, array $arguments = array() ]) : string
Parameters
- $routeName : string
-
the name of the route
- $arguments : array = array()
-
an array with arguments which will be filled into the url
Tags
Return values
string —the url
linkToRouteAbsolute()
Returns the absolute URL for a route
public
linkToRouteAbsolute(string $routeName[, array $arguments = array() ]) : string
Parameters
- $routeName : string
-
the name of the route
- $arguments : array = array()
-
an array with arguments which will be filled into the url
Tags
Return values
string —the absolute url