Documentation

Generator
in package

Table of Contents

$docFiles  : array<string|int, string>
XML documentation files used to produce the final output.
$ruleset  : Ruleset
The ruleset used for the run.
__construct()  : mixed
Constructs a doc generator.
generate()  : void
Generates the documentation for a standard.
getTitle()  : string
Retrieves the title of the sniff from the DOMNode supplied.
processSniff()  : void
Process the documentation for a single sniff.

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()
Return values
mixed

generate()

Generates the documentation for a standard.

public generate() : void

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.

Tags
see
processSniff()
Return values
void

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

processSniff()

Process the documentation for a single sniff.

protected abstract processSniff(DOMNode $doc) : void

Doc generators must implement this function to produce output.

Parameters
$doc : DOMNode

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

Tags
see
generate()
Return values
void

Search results