\phpDocumentor\GuidesUrlGenerator

Summary

Methods
Properties
Constants
generateUrl()
absoluteUrl()
relativeUrl()
canonicalUrl()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

generateUrl()

generateUrl(string  $path, string  $dirName) : string

Parameters

string $path
string $dirName

Returns

string —

absoluteUrl()

absoluteUrl(string  $basePath, string  $url) : string

Returns the absolute path, including prefixing '/'.

This method will, by design, return an absolute path including the prefixing slash. The slash will make it clear to the other URL generating methods that this need not be resolved and can stay the same.

Parameters

string $basePath
string $url

Returns

string —

relativeUrl()

relativeUrl(string  $url) : string

Resolves a relative URL.

Parameters

string $url

Returns

string —

canonicalUrl()

canonicalUrl(string  $basePath, string  $url) : string

Returns the Path used in the Metas to find this file.

The Metas collection, which is used to build the table of contents, uses these canonical paths as a unique identifier to find the metadata for that file. Technically speaking, the canonical URL is the absolute URL without the preceeding slash. But due to the many locations that this method is used; it will do its own resolving.

Parameters

string $basePath
string $url

Returns

string —