IURLGenerator

interface OCP\IURLGenerator
Class to generate URLs
Implemented by:OC\URLGenerator
Source:lib/public/IURLGenerator.php#38

Methods

public OCP\IURLGenerator::linkToRoute($routeName, $arguments=[])
Returns the URL for a route
Source:

lib/public/IURLGenerator.php#46

Parameters:
  • $routeName (string) the name of the route
  • $arguments (array) an array with arguments which will be filled into the url
Returns:

string the url

Since:

6.0.0

public OCP\IURLGenerator::linkToRouteAbsolute($routeName, $arguments=[])
Returns the absolute URL for a route
Source:

lib/public/IURLGenerator.php#55

Parameters:
  • $routeName (string) the name of the route
  • $arguments (array) an array with arguments which will be filled into the url
Returns:

string the absolute url

Since:

8.0.0

public OCP\IURLGenerator::linkToOCSRouteAbsolute($routeName, $arguments=[])
Source:

lib/public/IURLGenerator.php#63

Parameters:
  • $routeName (string)
  • $arguments (array)
Returns:

string

Since:

15.0.0

public OCP\IURLGenerator::linkTo($appName, $file, $args=[])
Returns an URL for an image or file
Source:

lib/public/IURLGenerator.php#74

Parameters:
  • $appName (string) the name of the app
  • $file (string) the name of the file
  • $args (array) array with param=>value, will be appended to the returned url

The value of $args will be urlencoded

Returns:

string the url

Since:

6.0.0

public OCP\IURLGenerator::imagePath($appName, $file)
Returns the link to an image, like linkTo but only with prepending img/
Source:

lib/public/IURLGenerator.php#83

Parameters:
  • $appName (string) the name of the app
  • $file (string) the name of the file
Returns:

string the url

Since:

6.0.0

public OCP\IURLGenerator::getAbsoluteURL($url)
Makes an URL absolute
Source:

lib/public/IURLGenerator.php#92

Parameters:
  • $url (string) the url in the ownCloud host
Returns:

string the absolute version of the url

Since:

6.0.0

public OCP\IURLGenerator::linkToDocs($key)
Source:

lib/public/IURLGenerator.php#99

Parameters:
  • $key (string)
Returns:

string url to the online documentation

Since:

8.0.0

public OCP\IURLGenerator::getBaseUrl()
Source:lib/public/IURLGenerator.php#105
Returns:string base url of the current request
Since:13.0.0