Class Parser

Description
  • abstract:

Located in /parser/Parser.php (line 32)


	
			
Direct descendents
Class Description
PHPParser Parser for PHP files
Variable Summary
mixed $filename
mixed $fileRef
mixed $line
mixed $logger
mixed $totalLines
Method Summary
Parser __construct ()
Number getCoveredLines ()
Next getLine ()
Type getLineType ()
Type getLineTypeStr ($lineType $lineType)
Number getTotalLines ()
Number getUncoveredLines ()
FALSE openFileReadOnly ()
FALSE parse ($filename $filename)
void processLine ($line $line)
Variables
mixed $coveredLines (line 36)
  • access: protected
mixed $filename (line 39)
  • access: protected
mixed $fileRef (line 38)
  • access: protected
mixed $line (line 41)
  • access: protected
mixed $logger (line 42)
  • access: protected
mixed $totalLines (line 35)
  • access: protected
mixed $uncoveredLines (line 37)
  • access: protected
Methods
Constructor __construct (line 50)

Constructor

  • access: public
Parser __construct ()
getCoveredLines (line 194)

Returns the number of covered PHP lines

  • return: of covered lines
  • access: public
Number getCoveredLines ()
getLine (line 103)

Returns the next line from file.

  • return: line from file
  • access: public
Next getLine ()
getLineType (line 131)

Returns the type of last line read.

The type can be either * LINE_TYPE_EXEC Line that can be executed. * LINE_TYPE_NOEXEC Line that cannot be executed. This includes the variable and function definitions (without initialization), blank lines, non-PHP lines, etc.

  • return: of last line
  • abstract:
  • access: public
Type getLineType ()

Redefined in descendants as:
getLineTypeStr (line 143)

Returns the string representation of LINE_TYPE

  • return: of line
  • access: public
Type getLineTypeStr ($lineType $lineType)
  • $lineType $lineType
getTotalLines (line 181)

Returns the total lines (PHP, non-PHP) from a file

  • return: of lines
  • access: public
Number getTotalLines ()
getUncoveredLines (line 210)

Returns the number of uncovered PHP lines

Note that the sum of covered and uncovered lines may not be equal to total lines.

  • return: of uncovered lines
  • access: public
Number getUncoveredLines ()
openFileReadOnly (line 167)

Opens the file to be parsed in Read-only mode

  • return: on failure.
  • access: protected
FALSE openFileReadOnly ()
parse (line 73)

Parse a given file

  • return: on error.
  • access: public
FALSE parse ($filename $filename)
  • $filename $filename: Full path of the file
processLine (line 92)

Process the line and classify it into either covered and uncovered.

  • abstract:
  • access: protected
void processLine ($line $line)
  • $line $line

Redefined in descendants as:

Documentation generated on Fri, 06 Jul 2007 12:51:36 -0700 by phpDocumentor 1.3.0RC3