Guides

DocumentNameResolver
in package
implements DocumentNameResolverInterface

FinalYes

Table of Contents

Interfaces

DocumentNameResolverInterface

Methods

absoluteUrl()  : string
Returns the absolute path, including prefixing '/'.
canonicalUrl()  : string
Returns the Path used in the Metas to find this file.

Methods

absoluteUrl()

Returns the absolute path, including prefixing '/'.

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

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
$basePath : string
$url : string
Return values
string

canonicalUrl()

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

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

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
$basePath : string
$url : string
Return values
string

        
On this page

Search results