HTMLDouble
extends HTML
in package
Table of Contents
Constants
- STYLESHEET : string = '<style> body { background-color: #FFFFFF; font...
- Stylesheet for the HTML output.
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.
- getRealFooter() : string
- Retrieve the _real_ footer of the HTML page.
- printFooter() : void
- [VISIBILITY WIDENING ONLY] Print the footer of the HTML page.
- printHeader() : void
- [VISIBILITY WIDENING ONLY] Print the header of the HTML page.
- printToc() : void
- [VISIBILITY WIDENING ONLY] Print the table of contents for the standard.
- processSniff() : void
- Process the documentation for a single sniff.
- getFormattedCodeComparisonBlock() : string
- Format a code comparison block found in a standard.
- getFormattedFooter() : string
- Format the footer of the HTML page without the date or version nr to make the expectation fixtures stable.
- getFormattedHeader() : string
- Format the header of the HTML page.
- getFormattedTextBlock() : string
- Format a text block found in a standard.
- getFormattedToc() : string
- Format the table of contents for the standard.
- getTitle() : string
- Retrieves the title of the sniff from the DOMNode supplied.
- printCodeComparisonBlock() : void
- Print a code comparison block found in a standard.
- printTextBlock() : void
- Print a text block found in a standard.
Constants
STYLESHEET
Stylesheet for the HTML output.
public
string
STYLESHEET
= '<style>
body {
background-color: #FFFFFF;
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
color: #000000;
}
h1 {
color: #666666;
font-size: 20px;
font-weight: bold;
margin-top: 0px;
background-color: #E6E7E8;
padding: 20px;
border: 1px solid #BBBBBB;
}
h2 {
color: #00A5E3;
font-size: 16px;
font-weight: normal;
margin-top: 50px;
}
h2 a.sniffanchor,
h2 a.sniffanchor {
color: #006C95;
opacity: 0;
padding: 0 3px;
text-decoration: none;
font-weight: bold;
}
h2:hover a.sniffanchor,
h2:focus a.sniffanchor {
opacity: 1;
}
.code-comparison {
width: 100%;
}
.code-comparison td {
border: 1px solid #CCCCCC;
}
.code-comparison-title, .code-comparison-code {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
vertical-align: top;
padding: 4px;
width: 50%;
background-color: #F1F1F1;
line-height: 15px;
}
.code-comparison-title {
text-align: left;
font-weight: 600;
}
.code-comparison-code {
font-family: Courier;
background-color: #F9F9F9;
}
.code-comparison-highlight {
background-color: #DDF1F7;
border: 1px solid #00A5E3;
line-height: 15px;
}
.tag-line {
text-align: center;
width: 100%;
margin-top: 30px;
font-size: 12px;
}
.tag-line a {
color: #000000;
}
</style>'
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
getRealFooter()
Retrieve the _real_ footer of the HTML page.
public
getRealFooter() : string
Return values
stringprintFooter()
[VISIBILITY WIDENING ONLY] Print the footer of the HTML page.
public
printFooter() : void
printHeader()
[VISIBILITY WIDENING ONLY] Print the header of the HTML page.
public
printHeader() : void
printToc()
[VISIBILITY WIDENING ONLY] Print the table of contents for the standard.
public
printToc() : void
processSniff()
Process the documentation for a single sniff.
public
processSniff(DOMNode $doc) : void
Parameters
- $doc : DOMNode
-
The DOMNode object for the sniff. It represents the "documentation" tag in the XML standard file.
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
Return values
stringgetFormattedFooter()
Format the footer of the HTML page without the date or version nr to make the expectation fixtures stable.
protected
getFormattedFooter() : string
Return values
stringgetFormattedHeader()
Format the header of the HTML page.
protected
getFormattedHeader() : string
Tags
Return values
stringgetFormattedTextBlock()
Format a text block found in a standard.
protected
getFormattedTextBlock(DOMNode $node) : string
Parameters
- $node : DOMNode
-
The DOMNode object for the text block.
Tags
Return values
stringgetFormattedToc()
Format the table of contents for the standard.
protected
getFormattedToc() : string
The TOC is just an unordered list of bookmarks to sniffs on the page.
Tags
Return values
stringgetTitle()
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
stringprintCodeComparisonBlock()
Print a code comparison block found in a standard.
protected
printCodeComparisonBlock(DOMNode $node) : void
Use HTML::getFormattedCodeComparisonBlock() instead.
Parameters
- $node : DOMNode
-
The DOMNode object for the code comparison block.
Tags
printTextBlock()
Print a text block found in a standard.
protected
printTextBlock(DOMNode $node) : void
Use HTML::getFormattedTextBlock() instead.
Parameters
- $node : DOMNode
-
The DOMNode object for the text block.