ResolveInlineLinkAndSeeTags
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.
Interfaces, Classes & Used Traits
- CompilerPassInterface
- Represents a single pass / business rule to be executed by the Compiler.
Constants
COMPILER_PRIORITY Line 41
mixed COMPILER_PRIORITY = 9002
REGEX_INLINE_LINK_OR_SEE_TAG Line 43
mixed REGEX_INLINE_LINK_OR_SEE_TAG = '/\\{\\@(see|link)[\\ ]+([^\\}]+)\\}/'
Properties
$router Line 46
private$router : \phpDocumentor\Transformer\Router\Router
$descriptor Line 49
private$descriptor : \phpDocumentor\Descriptor\DescriptorAbstract
$elementCollection Line 52
private$elementCollection : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\DescriptorAbstract>
$descriptorRepository Line 55
private$descriptorRepository : \phpDocumentor\Compiler\Linker\DescriptorRepository
$tagFactory Line 58
private$tagFactory : \phpDocumentor\Reflection\DocBlock\TagFactory
Methods
__construct() Line 63
Registers the router with this pass.
public__construct(Router $router, DescriptorRepository $descriptorRepository, TagFactory $tagFactory) : mixed
Parameters
Returns
mixed —
getDescription() Line 73
Returns a textual description of what this pass does for output purposes.
publicgetDescription() : string
Please note that the command line will be truncated to 68 characters (
Returns
string —
execute() Line 82
Iterates through each element in the project and replaces its inline @see and @link tag with a markdown representation.
publicexecute(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.
resolveSeeAndLinkTags() Line 96
Resolves all @see and @link tags in the description of the given descriptor to their markdown representation.
privateresolveSeeAndLinkTags(DescriptorAbstract $descriptor) : void
resolveTag() Line 119
Resolves an individual tag, indicated by the results of the Regex used to extract tags.
privateresolveTag(string[] $match) : string|string[]
Parameters
Returns
string|string[] —
isUrl() Line 155
Determines if the given link string represents a URL by checking if it is prefixed with a URI scheme.
privateisUrl(string $link) : bool
Parameters
Returns
bool —
createLinkOrSeeTagFromRegexMatch() Line 165
Creates a Tag Reflector from the given array of tag line, tag name and tag content.
privatecreateLinkOrSeeTagFromRegexMatch(string[] $match) : Tag
Parameters
Returns
Tag —
resolveElement() Line 182
Generates a Markdown link to the given Descriptor or returns the link text if no route to the Descriptor could be matched.
privateresolveElement(DescriptorAbstract $element, string $link[, string|null $description = null ]) : string
Parameters
Returns
string —
getLinkText() Line 199
Returns the link for the given reflector.
privategetLinkText(Tag $tagReflector) : string|null
Because the link tag and the see tag have different methods to acquire the link text we abstract that into this method.
Parameters
Returns
string|null —
createDocBlockContext() Line 215
Creates a DocBlock context containing the namespace and aliases for the current descriptor.
privatecreateDocBlockContext() : Context
Returns
Context —
generateMarkdownLink() Line 231
Generates a Markdown-formatted string representing a link with a description.
privategenerateMarkdownLink(Fqsen|string $link, string $description) : string