URLGenerator¶
-
class
OC\URLGenerator¶ - Class to generate URLs
Source: lib/private/URLGenerator.php#53 Implements: OCP\IURLGenerator
Properties¶
Methods¶
-
public
OC\URLGenerator::__construct($config, $cacheFactory, $request, $router)¶ Source: lib/private/URLGenerator.php#65
-
public
OC\URLGenerator::linkToRoute($routeName, $arguments=[])¶ - Creates an url using a defined route
Source: Parameters: - $routeName (string)
- $arguments (array) args with param=>value, will be appended to the returned url
Returns: string the url
Returns a url to the given route.
-
public
OC\URLGenerator::linkToRouteAbsolute($routeName, $arguments=[])¶ - Creates an absolute url using a defined route
Source: Parameters: - $routeName (string)
- $arguments (array) args with param=>value, will be appended to the returned url
Returns: string the url
Returns an absolute url to the given route.
-
public
OC\URLGenerator::linkToOCSRouteAbsolute($routeName, $arguments=[])¶ Source: lib/private/URLGenerator.php#100
-
public
OC\URLGenerator::linkTo($appName, $file, $args=[])¶ - Creates an url
Source: Parameters: - $appName (string) app
- $file (string) 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
Returns a url to the given app and file.
-
public
OC\URLGenerator::imagePath($appName, $file)¶ - Creates path to an image
Source: Parameters: - $appName (string) app
- $file (string) image name
Throws: \RuntimeExceptionIf the image does not existReturns: string the url
Returns the path to the image.
-
public
OC\URLGenerator::getAbsoluteURL($url)¶ - Makes an URL absolute
Source: Parameters: - $url (string) the url in the ownCloud host
Returns: string the absolute version of the url
-
public
OC\URLGenerator::linkToDocs($key)¶ Source: Parameters: - $key (string)
Returns: string url to the online documentation
-
public
OC\URLGenerator::getBaseUrl()¶ Source: lib/private/URLGenerator.php#273 Returns: string base url of the current request