phpDocumentor
[ class tree: phpDocumentor ] [ index: phpDocumentor ] [ all elements ]

Class: Parser

Source Location: /PhpDocumentor-1.5.0a1/phpDocumentor/Parser.inc

Class Overview

Publisher
   |
   --Parser

PHP Parser for PHP 4.2.3-


Author(s):

Version:

  • $Id$

Copyright:

  • 2000-2007 Kellin, Joshua Eichorn

Methods


Child classes:

phpDocumentor_TutorialHighlightParser
Highlights source code using parse()
PDFParser
ppageParser
Global package page parser
XMLPackagePageParser
Used to parse XML DocBook-based tutorials
phpDocumentorTParser
Tokenizer-based parser for PHP source code
parserDescParser
Parses a DocBlock description to retrieve abstract representations of

Inherited Variables

Inherited Methods

Class: Publisher

Publisher::publishEvent()
Publish an event
Publisher::subscribe()
Adds a subscriber to the $subscriber array().

Class Details

[line 338]
PHP Parser for PHP 4.2.3-

This parser is slower than the tokenizer-based parser, and is deprecated.



[ Top ]


Method Detail

Parser (Constructor)   [line 487]

Parser Parser( )

Set up invariant parsing variables

[ Top ]

categoryTagHandler   [line 2046]

void categoryTagHandler( string $word)

handles @category

Tag Handlers


Parameters:

string   $word   — 

[ Top ]

checkEventPop   [line 2612]

mixed checkEventPop( $word, $pevent)

this function checks whether parameter $word is a token for popping the current event off of the Event Stack.
  • Return: returns false, or the event number popped off of the stack

Overridden in child classes as:

phpDocumentor_TutorialHighlightParser::checkEventPop()
This function checks whether parameter $word is a token for popping the current event off of the Event Stack.

Parameters:

   $word   — 
   $pevent   — 

[ Top ]

checkEventPush   [line 2590]

mixed checkEventPush( $word, $pevent)

this function checks whether parameter $word is a token for pushing a new event onto the Event Stack.
  • Return: returns false, or the event number

Overridden in child classes as:

phpDocumentor_TutorialHighlightParser::checkEventPush()
This function checks whether parameter $word is a token for pushing a new event onto the Event Stack.

Parameters:

   $word   — 
   $pevent   — 

[ Top ]

configWordParser   [line 2957]

void configWordParser( $value $e)

tell the parser's WordParser $wp to set up tokens to parse words by.

tokens are word separators. In English, a space or punctuation are examples of tokens. In PHP, a token can be a ;, a parenthesis, or even the word "function"


Overridden in child classes as:

phpDocumentor_TutorialHighlightParser::configWordParser()
Tell the parser's WordParser $wp to set up tokens to parse words by.
phpDocumentor_HighlightParser::configWordParser()
Give the word parser necessary data to begin a new parse

Parameters:

$value   $e   —  integer an event number

[ Top ]

defaultTagHandler   [line 1989]

void defaultTagHandler( string $word)

Handles all standard tags that only have a description

Tag Handlers


Parameters:

string   $word   — 

[ Top ]

endTag   [line 1971]

void endTag( )

Called to clean up at the end of parsing a @tag in a docblock

[ Top ]

exampleTagHandler   [line 2031]

void exampleTagHandler( string $word)

handles @example

Tag Handlers


Parameters:

string   $word   — 

[ Top ]

getParserEventName   [line 2968]

void getParserEventName( $value $value)

Debugging function, takes an event number and attempts to return its name

Overridden in child classes as:

phpDocumentor_TutorialHighlightParser::getParserEventName()
searches for a parser event name based on its number
PDFParser::getParserEventName()
Return the name of the parser event
XMLPackagePageParser::getParserEventName()
debugging function
parserDescParser::getParserEventName()

Parameters:

$value   $value   —  integer an event number

[ Top ]

globalTagHandler   [line 2062]

void globalTagHandler( string $word)

handles @global

Tag Handlers


Parameters:

string   $word   — 

[ Top ]

invalidTagHandler   [line 2003]

void invalidTagHandler( string $word)

Handles tags like '@filesource' that only work in PHP 4.3.0+

Tag Handlers


Parameters:

string   $word   — 

[ Top ]

packageTagHandler   [line 2015]

void packageTagHandler( string $word)

handles @package

Tag Handlers


Parameters:

string   $word   — 

[ Top ]

paramTagHandler   [line 2192]

void paramTagHandler( string $word)

handles @param

Tag Handlers


Parameters:

string   $word   — 

[ Top ]

parse   [line 509]

bool parse( &$parse_data, string $path, [int $base = 0], [ $packages = false], string $parse_data)

Parse a new file
  • Staticvar: integer $endrecur: used for recursion limiting if a handler for an event is not found

Overridden in child classes as:

phpDocumentor_TutorialHighlightParser::parse()
Parse a new file
PDFParser::parse()
Parse text for PDFParser XML tags, and add the text to the PDF file
ppageParser::parse()
Parse a new file
XMLPackagePageParser::parse()
Parse a new file
phpDocumentorTParser::parse()
Parse a new file
phpDocumentor_HighlightParser::parse()
Parse a new file
parserDescParser::parse()
Parse a long or short description for tags

Parameters:

string   $parse_data   — 
string   $path   — 
int   $base   —  number of directories to drop off the bottom when creating names using path
   &$parse_data   — 
   $packages   — 

[ Top ]

propertyTagHandler   [line 2276]

void propertyTagHandler( string $word)

Handles @property(-read or -write) and @method magic tag

Tag Handlers


Parameters:

string   $word   — 

[ Top ]

returnTagHandler   [line 2228]

void returnTagHandler( string $word)

handles @return

Tag Handlers


Parameters:

string   $word   — 

[ Top ]

setupStates   [line 2628]

void setupStates( )

setup the parser tokens, and the pushEvent/popEvent arrays

Overridden in child classes as:

phpDocumentor_TutorialHighlightParser::setupStates()
Initialize all parser state variables
PDFParser::setupStates()
setup the parser tokens, and the pushEvent/popEvent arrays
ppageParser::setupStates()
set up invariant Parser variables
XMLPackagePageParser::setupStates()
setup the parser tokens, and the pushEvent/popEvent arrays
phpDocumentor_HighlightParser::setupStates()
Initialize all parser state variables
parserDescParser::setupStates()
setup the parser tokens, and the pushEvent/popEvent arrays

[ Top ]

staticvarTagHandler   [line 2134]

void staticvarTagHandler( string $word)

handles @staticvar

Tag Handlers


Parameters:

string   $word   — 

[ Top ]

usesTagHandler   [line 2170]

void usesTagHandler( string $word)

handles @uses

Tag Handlers


Parameters:

string   $word   — 

[ Top ]

varTagHandler   [line 2252]

void varTagHandler( string $word)

handles @var

Tag Handlers


Parameters:

string   $word   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:50:30 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.