ResolveInlineLinkAndSeeTags

Implements \phpDocumentor\Compiler\CompilerPassInterface

This step in the compilation process iterates through all elements and scans their descriptions for an inline `@see` or `@link` tag and resolves them to a markdown link.

package

Default

Methods

Registers the router queue with this pass.

__construct(\phpDocumentor\Transformer\Router\Queue $router) 

Creates a DocBlock context containing the namespace and aliases for the current descriptor.

createDocBlockContext() : \phpDocumentor\Reflection\DocBlock\Context

Response

\phpDocumentor\Reflection\DocBlock\Context

Creates a Tag Reflector from the given array of tag line, tag name and tag content.

createLinkOrSeeTagFromRegexMatch(array<mixed,string> $match) : \phpDocumentor\Reflection\DocBlock\Tag

Arguments

$match

array<mixed,string>

Response

\phpDocumentor\Reflection\DocBlock\Tag

Iterates through each element in the project and replaces its inline @see and @link tag with a markdown representation.

execute(\phpDocumentor\Descriptor\ProjectDescriptor $project) : void

This method will execute the business logic associated with a given compiler pass and allow it to manipulate or consumer the Object Graph using the ProjectDescriptor object.

Arguments

$project

\phpDocumentor\Descriptor\ProjectDescriptor

Representation of the Object Graph that can be manipulated.

Tries to find an element with the given FQSEN in the elements listing for this project.

findElement(string $fqsen) : \phpDocumentor\Descriptor\DescriptorAbstract|null

Arguments

$fqsen

string

Response

\phpDocumentor\Descriptor\DescriptorAbstract|null

Returns a textual description of what this pass does for output purposes.

getDescription() : string

Please note that the command line will be truncated to 68 characters ( .. 000.000s) so longer descriptions won't have much use.

Response

string

Returns the link for the given reflector.

getLinkText(\phpDocumentor\Reflection\DocBlock\Tag\SeeTag|\phpDocumentor\Reflection\DocBlock\Tag\LinkTag $tagReflector) : string

Because the link tag and the see tag have different methods to acquire the link text we abstract that into this method.

Arguments

$tagReflector

\phpDocumentor\Reflection\DocBlock\Tag\SeeTag|\phpDocumentor\Reflection\DocBlock\Tag\LinkTag

Response

string

Checks if the link represents a Fully Qualified Structural Element Name.

isFqsen(string $link) : boolean

Arguments

$link

string

Response

boolean

Determines if the given link string represents a URL by checking if it is prefixed with a URI scheme.

isUrl(string $link) : boolean

Arguments

$link

string

Response

boolean

Generates a Markdown link to the given Descriptor or returns the link text if no route to the Descriptor could be matched.

resolveElement(\phpDocumentor\Descriptor\DescriptorAbstract $element, string $link, string $description) : string

Arguments

$link

string

$description

string

Response

string

Resolves a QSEN to a FQSEN.

resolveQsen(string $link) : string

If a relative QSEN is provided then this method will attempt to resolve it given the current namespace and namespace aliases.

Arguments

$link

string

Response

string

Resolves all @see and @link tags in the description of the given descriptor to their markdown representation.

resolveSeeAndLinkTags(\phpDocumentor\Descriptor\DescriptorAbstract $descriptor) : void

Resolves an individual tag, indicated by the results of the Regex used to extract tags.

resolveTag(array<mixed,string> $match) : string

Arguments

$match

array<mixed,string>

Response

string

Constants

COMPILER_PRIORITY

COMPILER_PRIORITY

Properties

router

router : \phpDocumentor\Transformer\Router\RouterAbstract

descriptor

descriptor : \phpDocumentor\Descriptor\DescriptorAbstract

elementCollection

elementCollection : \phpDocumentor\Descriptor\Collection