\phpDocumentor\Compiler\PassResolveInlineLinkAndSeeTags

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

Summary

Methods
Properties
Constants
__construct()
getDescription()
execute()
No public properties found
COMPILER_PRIORITY
REGEX_INLINE_LINK_OR_SEE_TAG
No protected methods found
No protected properties found
N/A
resolveSeeAndLinkTags()
resolveTag()
isUrl()
isFqsen()
createLinkOrSeeTagFromRegexMatch()
resolveQsen()
resolveElement()
getLinkText()
findElement()
createDocBlockContext()
generateMarkdownLink()
$router
$descriptor
$elementCollection
N/A

Constants

COMPILER_PRIORITY

COMPILER_PRIORITY

Properties

Methods

getDescription()

getDescription() : string

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

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

Returns

string

execute()

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

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

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.

Parameters

\phpDocumentor\Descriptor\ProjectDescriptor $project

Representation of the Object Graph that can be manipulated.

resolveSeeAndLinkTags()

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

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

Parameters

\phpDocumentor\Descriptor\DescriptorAbstract $descriptor

resolveTag()

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

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

Parameters

array<mixed,string> $match

Returns

string

isUrl()

isUrl(string  $link) : boolean

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

Parameters

string $link

Returns

boolean

isFqsen()

isFqsen(string  $link) : boolean

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

Parameters

string $link

Returns

boolean

createLinkOrSeeTagFromRegexMatch()

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

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

Parameters

array<mixed,string> $match

Returns

\phpDocumentor\Reflection\DocBlock\Tag

resolveQsen()

resolveQsen(string  $link) : string

Resolves a QSEN to a FQSEN.

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

Parameters

string $link

Returns

string

resolveElement()

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

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

Parameters

\phpDocumentor\Descriptor\DescriptorAbstract $element
string $link
string $description

Returns

string

getLinkText()

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

Returns the link for the given reflector.

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

Parameters

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

Returns

string

findElement()

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

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

Parameters

string $fqsen

Returns

\phpDocumentor\Descriptor\DescriptorAbstract|null

createDocBlockContext()

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

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

Returns

\phpDocumentor\Reflection\DocBlock\Context

generateMarkdownLink()

generateMarkdownLink(string  $link, string  $description) : string

Generates a Markdown-formatted string representing a link with a description.

Parameters

string $link
string $description

Returns

string