ExternalUrlGenerator
in package
implements
UrlGeneratorInterface
FinalYes
Prefixes internal URLs (non-documents) with a pre-defined base URI.
This is mostly useful when assets are uploaded outside of the documentation project (e.g. a dedicated CDN). The other URL generation methods are delegated to the wrapped URL generator.
Table of Contents
Interfaces
Properties
- $baseUri : string
- $urlGenerator : UrlGeneratorInterface
Methods
- __construct() : mixed
- createFileUrl() : string
- Create a url with a file ending derived from the output format
- generateCanonicalOutputUrl() : string
- generateInternalUrl() : string
Properties
$baseUri read-only
private
string
$baseUri
$urlGenerator read-only
private
UrlGeneratorInterface
$urlGenerator
Methods
__construct()
public
__construct(UrlGeneratorInterface $urlGenerator, string $baseUri) : mixed
Parameters
- $urlGenerator : UrlGeneratorInterface
- $baseUri : string
createFileUrl()
Create a url with a file ending derived from the output format
public
createFileUrl(RenderContext $context, string $filename[, string|null $anchor = null ]) : string
Parameters
- $context : RenderContext
- $filename : string
- $anchor : string|null = null
Return values
stringgenerateCanonicalOutputUrl()
public
generateCanonicalOutputUrl(RenderContext $context, string $reference[, string|null $anchor = null ]) : string
Parameters
- $context : RenderContext
- $reference : string
- $anchor : string|null = null
Return values
stringgenerateInternalUrl()
public
generateInternalUrl(RenderContext $renderContext, string $canonicalUrl) : string
Parameters
- $renderContext : RenderContext
- $canonicalUrl : string