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

Public Member Functions

 __construct ($includePaths=array("."), $excludePaths=array(), $reporter="new HtmlCoverageReporter()")
 getTraceFilePath ()
 setTraceFilePath ($traceFilePath)
 getTmpDir ()
 setTmpDir ($tmpTraceDir)
 getCoverageFileName ()
 setCoverageFileName ($covFileName)
 cleanCoverageFile ()
 getCoverageXml ()
 saveCoverageXml ()
 generateReport ($xmlUrl, $stream=false)

Protected Member Functions

 prepareCoverageXml ()
 parseCoverageXml (&$xml, $stream=false)
 appendDataToFile ($newXml)

Protected Attributes

 $traceFilePath
 $xdebugTraceReader
 $tmpDir
 $tmpTraceFilename = "phpcoverage.xdebug.trace"
 $coverageFileName = "phpcoverage.coverage.xml"
 $xmlStart = "<?xml version=\"1.0\" encoding=\"utf-8\" ?><spike-phpcoverage>"
 $xmlEnd = "</spike-phpcoverage>"

Detailed Description

Definition at line 27 of file RemoteCoverageRecorder.php.


Constructor & Destructor Documentation

__construct ( includePaths = array("."),
excludePaths = array(),
reporter = "new HtmlCoverageReporter()" 
)

Constructor

public

Reimplemented from CoverageRecorder.

Definition at line 47 of file RemoteCoverageRecorder.php.


Member Function Documentation

appendDataToFile ( newXml) [protected]

Append coverage data to xml file

Parameters:
$newXmlNew xml recorded
Returns:
True on success; false otherwise protected

Definition at line 226 of file RemoteCoverageRecorder.php.

Here is the caller graph for this function:

Deletes a coverage data file if one exists.

Returns:
Boolean True on success, False on failure. public

Definition at line 99 of file RemoteCoverageRecorder.php.

generateReport ( xmlUrl,
stream = false 
)

Generate report from the xml coverage data The preferred method for usage of this function is passing a stream of the XML data in. This is much more efficient and consumes less memory.

Parameters:
$xmlUrlUrl where XML data is available or string
$stream=falseIs the xml available as stream? public

Definition at line 300 of file RemoteCoverageRecorder.php.

Here is the call graph for this function:

Definition at line 82 of file RemoteCoverageRecorder.php.

Dumps the coverage data in XML format

public

Definition at line 192 of file RemoteCoverageRecorder.php.

getTmpDir ( )

Definition at line 74 of file RemoteCoverageRecorder.php.

Definition at line 66 of file RemoteCoverageRecorder.php.

parseCoverageXml ( &$  xml,
stream = false 
) [protected]

Parse coverage XML to regenerate the Coverage data array.

Parameters:
$xmlXML String or URL of the coverage data
$stream=falseIs the input a stream?
Returns:
protected

Definition at line 158 of file RemoteCoverageRecorder.php.

Here is the caller graph for this function:

prepareCoverageXml ( ) [protected]

Convert the Coverage data into an XML.

Returns:
String XML generated from Coverage data protected

Definition at line 123 of file RemoteCoverageRecorder.php.

Here is the caller graph for this function:

Append coverage xml to a xml data file.

Returns:
Boolean True on success, False on error public

Definition at line 268 of file RemoteCoverageRecorder.php.

Here is the call graph for this function:

setCoverageFileName ( covFileName)

Definition at line 86 of file RemoteCoverageRecorder.php.

setTmpDir ( tmpTraceDir)

Definition at line 78 of file RemoteCoverageRecorder.php.

setTraceFilePath ( traceFilePath)

Definition at line 70 of file RemoteCoverageRecorder.php.


Field Documentation

$coverageFileName = "phpcoverage.coverage.xml" [protected]

Definition at line 34 of file RemoteCoverageRecorder.php.

$tmpDir [protected]

Definition at line 32 of file RemoteCoverageRecorder.php.

$tmpTraceFilename = "phpcoverage.xdebug.trace" [protected]

Definition at line 33 of file RemoteCoverageRecorder.php.

$traceFilePath [protected]

Definition at line 30 of file RemoteCoverageRecorder.php.

$xdebugTraceReader [protected]

Definition at line 31 of file RemoteCoverageRecorder.php.

$xmlEnd = "</spike-phpcoverage>" [protected]

Definition at line 37 of file RemoteCoverageRecorder.php.

$xmlStart = "<?xml version=\"1.0\" encoding=\"utf-8\" ?><spike-phpcoverage>" [protected]

Definition at line 36 of file RemoteCoverageRecorder.php.


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