Class parserData

Description

Contains an in-memory representation of all documentable elements (parserPage, parserFunction, parserDefine, parserInclude, parserClass, parserMethod, parserVar) and their DocBlocks (parserDocBlock).

This class works in coordination with phpDocumentor_IntermediateParser to take output from Parser::handleEvent() and create indexes, links, and other assorted things (all documented in phpDocumentor_IntermediateParser and Converter)

Located in /phpDocumentor/ParserData.inc (line 363)


	
			
Variable Summary
Method Summary
 void addElement (parserElement &$element)
 string addLink (parserElement &$element, [string $classorpackage = ''], [string $subpackage = ''])
 array getClasses (Converter &$c)
 string &getLink (Converter &$c, [bool $text = false])
 string getName ()
 boolean hasClasses ()
 bool hasInterfaces ()
 bool isClean ()
 void setDocBlock (parserDocBlock &$docblock)
 void setParent (parserPage &$parent)
Variables
array $classelements = array() (line 395)

array of parsed class elements

boolean $clean = true (line 419)

used by phpDocumentor_IntermediateParser::handleDocBlock() to

determine whether a docblock is a page-level docblock or not. $clean is true as long as only 0 or 1 docblock has been parsed, and no element other than parserPage has been parsed

mixed $docblock = false (line 424)

DocBlock (parserDocBlock) for this page, or false if not set

array $elements = array() (line 375)

array of parsed elements

array $links = array() (line 411)

array of links descended from abstractLink

false|parserPage $parent = false (line 370)

parserPage element that is this parserData's parent, or false if not set.

array $privateclasselements = array() (line 405)

array of parsed class elements with @access private

array $privateelements = array() (line 390)

array of parsed elements with @access private

parserTutorial|false $tutorial = false (line 400)
string $type = 'page' (line 438)

Type is used by many functions to skip the hassle of if

  1. phpDocumentor_get_class($blah== 'parserBlah'
always 'page', used in element indexing and conversion functions found in Converter

Methods
addElement (line 449)

add a new element to the tracking array

void addElement (parserElement &$element)
addLink (line 553)

adds a link

string addLink (parserElement &$element, [string $classorpackage = ''], [string $subpackage = ''])
  • parserElement &$element: element to add a new link (descended from abstractLink) to the $links array
  • string $classorpackage: classname for elements that are class-based (this may be deprecated in the future, as the classname should be contained within the element. if $element is a page, this parameter is a package name
  • string $subpackage: subpackage name for page elements
addTutorial (line 499)

adds a tutorial parser

void addTutorial (parserTutorial $t, Converter &$c)
explicitDocBlock (line 532)

Tells this page that its DocBlock was not implicit

bool explicitDocBlock ()
getClasses (line 633)

returns a list of all classes declared in a file

  • return: Format: array( packagename => parserClass, packagename => parserClass, ... )
array getClasses (Converter &$c)
getLink (line 615)

returns a link

string &getLink (Converter &$c, [bool $text = false])
  • Converter &$c: the output converter
  • bool $text: a text flag
getName (line 650)

Get the output-safe filename (. changed to _)

string getName ()
getTutorial (line 512)

If this file has a tutorial associated with it, returns a link to the tutorial.

tutorialLink getTutorial ()
hasClasses (line 486)

Does this package have classes?

boolean hasClasses ()
hasExplicitDocBlock (line 522)

If the page-level DocBlock was present in the source, returns true

bool hasExplicitDocBlock ()
hasInterfaces (line 476)

Does this package have interfaces?

bool hasInterfaces ()
isClean (line 674)

checks if the element is "cleaned" already

  • return: returns the value of $clean
bool isClean ()
setDocBlock (line 687)

sets the docblock

void setDocBlock (parserDocBlock &$docblock)
setParent (line 664)

sets the parent

void setParent (parserPage &$parent)
  • parserPage &$parent: parent element of this parsed data

Documentation generated on Mon, 05 Dec 2011 21:06:16 -0600 by phpDocumentor 1.4.4