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 DOMElement supplied.
- 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
= []
$ruleset
The ruleset used for the run.
public
Ruleset
$ruleset
= null
Methods
__construct()
Constructs a doc generator.
public
__construct(Ruleset $ruleset) : mixed
Parameters
- $ruleset : Ruleset
-
The ruleset used for the run.
Tags
generate()
Generates the documentation for a standard.
public
generate() : void
Tags
getFormattedCodeComparisonBlock()
Format a code comparison block found in a standard.
protected
getFormattedCodeComparisonBlock(DOMElement $node) : string
Parameters
- $node : DOMElement
-
The DOMElement object for the code comparison block.
Tags
Return values
stringgetFormattedFooter()
Format the markdown footer.
protected
getFormattedFooter() : string
Tags
Return values
stringgetFormattedHeader()
Format the markdown header.
protected
getFormattedHeader() : string
Tags
Return values
stringgetFormattedTextBlock()
Format a text block found in a standard.
protected
getFormattedTextBlock(DOMElement $node) : string
Parameters
- $node : DOMElement
-
The DOMElement object for the text block.
Tags
Return values
stringgetTitle()
Retrieves the title of the sniff from the DOMElement supplied.
protected
getTitle(DOMElement $doc) : string
Parameters
- $doc : DOMElement
-
The DOMElement object for the sniff. It represents the "documentation" tag in the XML standard file.
Return values
stringprocessSniff()
Process the documentation for a single sniff.
protected
processSniff(DOMElement $doc) : void
Parameters
- $doc : DOMElement
-
The DOMElement 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
Return values
stringformatCodeTitle()
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.