Moodle  2.2.1
http://www.collinsharper.com
HtmlCoverageReporter Class Reference
Inheritance diagram for HtmlCoverageReporter:
Collaboration diagram for HtmlCoverageReporter:

Public Member Functions

 __construct ($heading="Coverage Report", $style="", $dir="report")
 generateReport (&$data)

Protected Member Functions

 writeIndexFileTableHead ()
 writeIndexFileTableRow ($fileLink, $realFile, $fileCoverage)
 writeIndexFileGrandTotalPercentage ()
 writeIndexFile ()
 markFile ($phpFile, $fileLink, &$coverageLines)
 writeFileTableHead ()
 writeFileTableRow ($type, $lineCnt, $line, $coverageLineCnt)
 preserveSpacing ($string)

Detailed Description

Definition at line 26 of file HtmlCoverageReporter.php.


Constructor & Destructor Documentation

__construct ( heading = "Coverage Report",
style = "",
dir = "report" 
)

Constructor method (PHP5 only)

Parameters:
$headingHeading of the report (shown as title)
$styleName of the stylesheet file
$dirDirectory where the report files should be dumped public

Reimplemented from CoverageReporter.

Definition at line 49 of file HtmlCoverageReporter.php.


Member Function Documentation

generateReport ( &$  data)

Implementaion of generateReport abstract function. This is the only function that will be called by the instrumentor.

Parameters:
&$dataReference to Coverage Data public

Reimplemented from CoverageReporter.

Reimplemented in moodle_coverage_reporter.

Definition at line 68 of file HtmlCoverageReporter.php.

Here is the call graph for this function:

markFile ( phpFile,
fileLink,
&$  coverageLines 
) [protected]

Mark a source code file based on the coverage data gathered

Parameters:
$phpFileName of the actual source file
$fileLinkLink to the html mark-up file for the $phpFile
&$coverageLinesCoverage recording for $phpFile
Returns:
boolean FALSE on failure protected

Reimplemented in moodle_coverage_reporter.

Definition at line 447 of file HtmlCoverageReporter.php.

Here is the call graph for this function:

Here is the caller graph for this function:

preserveSpacing ( string) [protected]

Changes all tabs and spaces with HTML non-breakable spaces.

Parameters:
$stringString containing spaces and tabs.
Returns:
string HTML string with replacements. protected

Definition at line 644 of file HtmlCoverageReporter.php.

Here is the caller graph for this function:

writeFileTableHead ( ) [protected]

Writes table heading for file details table.

Returns:
string HTML string representing one table row. protected

Definition at line 578 of file HtmlCoverageReporter.php.

Here is the caller graph for this function:

writeFileTableRow ( type,
lineCnt,
line,
coverageLineCnt 
) [protected]

Write a line for file details table.

Parameters:
$colorText color
$bgcolorRow bgcolor
$lineCntLine number
$lineThe source code line
$coverageLineCntNumber of time the line was executed.
Returns:
string HTML code for a table row. protected

Definition at line 603 of file HtmlCoverageReporter.php.

Here is the call graph for this function:

Here is the caller graph for this function:

writeIndexFile ( ) [protected]

Writes index.html file from all coverage recordings.

Returns:
boolean FALSE on failure protected

Definition at line 333 of file HtmlCoverageReporter.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Writes the grand total for coverage recordings on the index.html

Returns:
string HTML code for grand total row protected

Definition at line 274 of file HtmlCoverageReporter.php.

Here is the call graph for this function:

Here is the caller graph for this function:

writeIndexFileTableHead ( ) [protected]

Writes the table heading for index.html

Returns:
string Table heading row code protected

Definition at line 199 of file HtmlCoverageReporter.php.

Here is the caller graph for this function:

writeIndexFileTableRow ( fileLink,
realFile,
fileCoverage 
) [protected]

Writes one row in the index.html table to display filename and coverage recording.

Parameters:
$fileLinklink to html details file.
$realFilepath to real PHP file.
$fileCoverageCoverage recording for that file.
Returns:
string HTML code for a single row. protected

Reimplemented in moodle_coverage_reporter.

Definition at line 238 of file HtmlCoverageReporter.php.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations