Documentation

Markdown extends Generator
in package

Table of Contents

Properties

$docFiles  : array<string|int, string>
XML documentation files used to produce the final output.
$ruleset  : Ruleset
The ruleset used for the run.

Methods

__construct()  : mixed
Constructs a doc generator.
generate()  : void
Generates the documentation for a standard.
getFormattedCodeComparisonBlock()  : string
Format a code comparison block found in a standard.
getFormattedFooter()  : string
Format the markdown footer.
getFormattedHeader()  : string
Format the markdown header.
getFormattedTextBlock()  : string
Format a text block found in a standard.
getTitle()  : string
Retrieves the title of the sniff from the DOMNode supplied.
printCodeComparisonBlock()  : void
Print a code comparison block found in a standard.
printFooter()  : void
Print the markdown footer.
printHeader()  : void
Print the markdown header.
printTextBlock()  : void
Print a text block found in a standard.
processSniff()  : void
Process the documentation for a single sniff.
formatCodeSample()  : string
Retrieve a code block contents and prepare it for output as HTML.
formatCodeTitle()  : string
Retrieve a code block title and prepare it for output as HTML.

Properties

$docFiles

XML documentation files used to produce the final output.

public array<string|int, string> $docFiles = []

Methods

__construct()

Constructs a doc generator.

public __construct(Ruleset $ruleset) : mixed
Parameters
$ruleset : Ruleset

The ruleset used for the run.

Tags
see
generate()

generate()

Generates the documentation for a standard.

public generate() : void
Tags
see
processSniff()

getFormattedCodeComparisonBlock()

Format a code comparison block found in a standard.

protected getFormattedCodeComparisonBlock(DOMNode $node) : string
Parameters
$node : DOMNode

The DOMNode object for the code comparison block.

Tags
since
3.12.0

Replaces the deprecated Markdown::printCodeComparisonBlock() method.

Return values
string

getFormattedFooter()

Format the markdown footer.

protected getFormattedFooter() : string
Tags
since
3.12.0

Replaces the deprecated Markdown::printFooter() method.

Return values
string

getFormattedHeader()

Format the markdown header.

protected getFormattedHeader() : string
Tags
since
3.12.0

Replaces the deprecated Markdown::printHeader() method.

Return values
string

getFormattedTextBlock()

Format a text block found in a standard.

protected getFormattedTextBlock(DOMNode $node) : string
Parameters
$node : DOMNode

The DOMNode object for the text block.

Tags
since
3.12.0

Replaces the deprecated Markdown::printTextBlock() method.

Return values
string

getTitle()

Retrieves the title of the sniff from the DOMNode supplied.

protected getTitle(DOMNode $doc) : string
Parameters
$doc : DOMNode

The DOMNode object for the sniff. It represents the "documentation" tag in the XML standard file.

Return values
string

printCodeComparisonBlock()

Print a code comparison block found in a standard.

protected printCodeComparisonBlock(DOMNode $node) : void

Use Markdown::getFormattedCodeComparisonBlock() instead.

Parameters
$node : DOMNode

The DOMNode object for the code comparison block.

Tags
codeCoverageIgnore

printFooter()

Print the markdown footer.

protected printFooter() : void

Use Markdown::getFormattedFooter() instead.

Tags
codeCoverageIgnore

printHeader()

Print the markdown header.

protected printHeader() : void

Use Markdown::getFormattedHeader() instead.

Tags
codeCoverageIgnore

printTextBlock()

Print a text block found in a standard.

protected printTextBlock(DOMNode $node) : void

Use Markdown::getFormattedTextBlock() instead.

Parameters
$node : DOMNode

The DOMNode object for the text block.

Tags
codeCoverageIgnore

processSniff()

Process the documentation for a single sniff.

protected processSniff(DOMNode $doc) : void
Parameters
$doc : DOMNode

The DOMNode object for the sniff. It represents the "documentation" tag in the XML standard file.

formatCodeSample()

Retrieve a code block contents and prepare it for output as HTML.

private formatCodeSample(DOMElement $codeElm) : string
Parameters
$codeElm : DOMElement

The DOMElement object for a code block.

Tags
since
3.12.0
Return values
string

formatCodeTitle()

Retrieve a code block title and prepare it for output as HTML.

private formatCodeTitle(DOMElement $codeElm) : string
Parameters
$codeElm : DOMElement

The DOMElement object for a code block.

Tags
since
3.12.0
Return values
string
On this page

Search results