IURLGenerator

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

Methods

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

lib/public/IURLGenerator.php#42

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=array())
Returns the absolute URL for a route
Source:

lib/public/IURLGenerator.php#51

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#59

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

string

Since:

15.0.0

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

lib/public/IURLGenerator.php#70

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#79

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#88

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#95

Parameters:
  • $key (string)
Returns:

string url to the online documentation

Since:

8.0.0

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