Class Parser

Description
  • abstract:

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


	
			
Direct descendents
Class Description
PHPParser Parser for PHP files
Variable Summary
mixed $filename
mixed $fileRef
mixed $line
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 29)
  • access: protected
mixed $filename (line 32)
  • access: protected
mixed $fileRef (line 31)
  • access: protected
mixed $line (line 34)
  • access: protected
mixed $totalLines (line 28)
  • access: protected
mixed $uncoveredLines (line 30)
  • access: protected
Methods
Constructor __construct (line 42)

Constructor

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

Returns the number of covered PHP lines

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

Returns the next line from file.

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

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 132)

Returns the string representation of LINE_TYPE

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

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

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

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 156)

Opens the file to be parsed in Read-only mode

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

Parse a given file

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

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 Mon, 20 Jun 2005 13:11:05 -0700 by phpDocumentor 1.3.0RC3