UrlHelper
in package
A helper service for manipulating URLs within and outside the request scope.
Tags
Table of Contents
- $requestContext : mixed
- $requestStack : mixed
- __construct() : mixed
- getAbsoluteUrl() : string
- getRelativePath() : string
- getAbsoluteUrlFromContext() : string
Properties
$requestContext
private
mixed
$requestContext
$requestStack
private
mixed
$requestStack
Methods
__construct()
public
__construct(RequestStack $requestStack[, RequestContextAwareInterface|RequestContext|null $requestContext = null ]) : mixed
Parameters
- $requestStack : RequestStack
- $requestContext : RequestContextAwareInterface|RequestContext|null = null
Return values
mixed —getAbsoluteUrl()
public
getAbsoluteUrl(string $path) : string
Parameters
- $path : string
Return values
string —getRelativePath()
public
getRelativePath(string $path) : string
Parameters
- $path : string
Return values
string —getAbsoluteUrlFromContext()
private
getAbsoluteUrlFromContext(string $path) : string
Parameters
- $path : string