Class: Generator
Source Location: /PHP_CodeSniffer-3.0.2/src/Generators/Generator.php
The base class for all PHP_CodeSniffer documentation generators.
Author(s):
Copyright:
- 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
Child classes:
- Markdown
- A doc generator that outputs documentation in Markdown format.
- HTML
- A doc generator that outputs documentation in one big HTML file.
- Text
- A doc generator that outputs text-based documentation.
Inherited Variables
Inherited Methods
Class Details
[line
19]
The base class for all PHP_CodeSniffer documentation generators.
Documentation generators are used to print documentation about code sniffs in a standard.
Class Variables
$docFiles = array()
[line 34]
XML documentation files used to produce the final output.
$ruleset = null
[line 27]
The ruleset used for the run.
Type:
\PHP_CodeSniffer\Ruleset
Method Detail
__construct (Constructor) [line 44]
Generator __construct(
Ruleset
$ruleset)
Constructs a doc generator.
- See: generate()
- Access: public
Parameters:
\PHP_CodeSniffer\Ruleset
$ruleset
—
The ruleset used for the run.
generate [line 92]
Generates the documentation for a standard.
It's probably wise for doc generators to override this method so they have control over how the docs are produced. Otherwise, the processSniff method should be overridden to output content for each sniff.
- See: processSniff()
- Access: public
Overridden in child classes as:
- Markdown::generate()
- Generates the documentation for a standard.
- HTML::generate()
- Generates the documentation for a standard.
getTitle [line 75]
string getTitle(
DOMNode
\$doc, \DOMNode
$doc)
Retrieves the title of the sniff from the DOMNode supplied.
Parameters:
\DOMNode
$doc
—
The DOMNode object for the sniff. It represents the "documentation" tag in the XML standard file.
DOMNode
\$doc
—
processSniff [line 116]
void processSniff(
DOMNode
\$doc, \DOMNode
$doc)
Process the documentation for a single sniff.
Doc generators must implement this function to produce output.
- See: generate()
- Abstract:
- Access: protected
Overridden in child classes as:
- Markdown::processSniff()
- Process the documentation for a single sniff.
- HTML::processSniff()
- Process the documentation for a single sniff.
- Text::processSniff()
- Process the documentation for a single sniff.
Parameters:
\DOMNode
$doc
—
The DOMNode object for the sniff. It represents the "documentation" tag in the XML standard file.
DOMNode
\$doc
—
Documentation generated on 2019年3月11日 14:04:47 -0400 by
phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.