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

Class: parserDocBlock

Source Location: /phpDocumentor/ParserDocBlock.inc

Class parserDocBlock

Property Summary
string   $category  
parserDesc   $desc  
false|integer   $endlinenumber   Line number in the source on which this docblock ends
boolean   $explicitcategory   fix for bug 708559
boolean   $explicitpackage   fix for bug 591396
array   $funcglobals   array of global variable data.
boolean   $hasaccess   whether this DocBlock has an @access tag
boolean   $hasname   whether this DocBlock has a @name tag
false|integer   $linenumber   Line number in the source on which this docblock begins
string   $package  
string   $packagedescrip   description of package parsed from @package tag
array   $params   array of param data.
array   $processed_desc  
array   $processed_sdesc  
mixed   $return   This is either a parserReturnTag or false if no return tag is present
parserDesc   $sdesc  
array   $statics   array of static variable data.
string   $subpackage  
string   $subpackagedescrip   description of subpackage parsed from @package tag
array   $tags   array of parserTags
array   $unknown_tags   array of unrecognized parserTags
mixed   $var   This is either a parserVarTag or false if no var tag is present

[ Top ]
Method Summary
parserDocBlock   parserDocBlock()   sets package to default
void   addAccess()   add an @access tag to the tags array
void   addExample()   adds an @example tag
void   addFileSource()   Adds a new @filesource tag to the DocBlock
void   addFuncGlobal()   adds a function declaration of @global to the $funcglobals array
void   addKeyword()  
void   addLink()   creates a parserLinkTag and adds it to the $tags array
void   addName()   Adds a @name tag to the tag list
void   addPackage()  
void   addParam()  
void   addReturn()   creates a parserReturnTag and adds it to the $tags array
void   addSee()   creates a parserLinkTag and adds it to the $tags array
void   addStaticVar()  
void   addTag()   Used to insert DocBlock Template tags into a docblock
void   addUnknownTag()   adds an unknown tag to the $unknown_tags array for use by custom converters
void   addUses()   Add a @uses tag to the DocBlock
void   addVar()   creates a parserVarTag and adds it to the $tags array
void   canSource()   Tells the DocBlock it can have a @filesource tag
void   cantSource()   Tells the DocBlock it can't have a @filesource tag
void   changeGlobal()  
void   changeParam()  
void   changeStatic()  
string   getDesc()  
integer   getEndLineNumber()   Retrieve ending line number
boolean   getExplicitCategory()   If the DocBlock has a @category tag, then this returns true
boolean   getExplicitPackage()   If the DocBlock has a @package tag, then this returns true
mixed   getKeyword()  
integer   getLineNumber()   Retrieve starting line number
string   getSDesc()  
string   getType()  
boolean   hasInheritDoc()   Wrapper for parserDesc::hasInheritDoc()
array   listParams()  
void   listTags()  
void   overridePackage()   set the element's package to the passed values. Used in phpDocumentor_IntermediateParser to align package of
void   postProcess()   Parse out any html tags from doc comments, and make them into
void   replaceInheritDoc()   Wrapper for parserDesc::replaceInheritDoc()
void   resetParams()  
void   setDesc()  
void   setEndLineNumber()   Sets the ending line number for the DocBlock
void   setExplicitCategory()   Used if this docblock has a @category tag.
void   setExplicitPackage()   Used if this docblock has a @package tag.
void   setLineNumber()   Sets the starting line number for the DocBlock
void   setShortDesc()   Set the short description of the DocBlock
void   setSource()   Passes to parserStringWithInlineTags::setSource()
void   updateGlobals()   replaces nameless global variables in the $funcglobals array with their names
void   updateModifiers()  
void   updateParams()   replaces nameless parameters in the $params array with their names
void   updateStatics()   replaces nameless static variables in the $statics array with their names

[ Top ]
Properties
string   $category [line 215]

[ Top ]
parserDesc   $desc = false [line 134]

[ Top ]
false|integer   $endlinenumber = false [line 158]

Line number in the source on which this docblock ends

Information Tags:
Since:  1.2

[ Top ]
boolean   $explicitcategory = false [line 213]

fix for bug 708559

API Tags:
Usedby:  parserDocBlock::setExplicitCategory()


[ Top ]
boolean   $explicitpackage = false [line 208]

fix for bug 591396

API Tags:
Usedby:  parserDocBlock::setExplicitPackage()


[ Top ]
array   $funcglobals = array() [line 184]

array of global variable data.

Format: array(index of global variable in @global tag list -OR- global variable name => array(datatype,parserStringWithInlineTags),...)


[ Top ]
boolean   $hasaccess = false [line 223]

whether this DocBlock has an @access tag


[ Top ]
boolean   $hasname = false [line 227]

whether this DocBlock has a @name tag


[ Top ]
false|integer   $linenumber = false [line 152]

Line number in the source on which this docblock begins

Information Tags:
Since:  1.2

[ Top ]
string   $package = 'default' [line 217]

[ Top ]
string   $packagedescrip = '' [line 233]

description of package parsed from @package tag

Unused in this version


[ Top ]
array   $params = array() [line 176]

array of param data.

Format: array(index of param in function parameter list -OR- parameter name => parserStringWithInlineTags,...)


[ Top ]
array   $processed_desc = false [line 138]

[ Top ]
array   $processed_sdesc = false [line 142]

[ Top ]
mixed   $return = false [line 198]

This is either a parserReturnTag or false if no return tag is present


[ Top ]
parserDesc   $sdesc = false [line 146]

[ Top ]
array   $statics = array() [line 193]

array of static variable data.

Format: array(index of static variable in @global tag list -OR- static variable name => parserStaticvarTag,...)


[ Top ]
string   $subpackage = '' [line 219]

[ Top ]
string   $subpackagedescrip = '' [line 239]

description of subpackage parsed from @package tag

Unused in this version


[ Top ]
array   $tags = array() [line 163]

array of parserTags


[ Top ]
array   $unknown_tags = array() [line 168]

array of unrecognized parserTags


[ Top ]
mixed   $var = false [line 203]

This is either a parserVarTag or false if no var tag is present


[ Top ]
Methods
Constructor parserDocBlock  [line 252]

  parserDocBlock parserDocBlock( )

sets package to default


API Tags:
Global:  string $phpDocumentor_DefaultPackageName: default package name


[ Top ]
addAccess  [line 910]

  void addAccess( string $value  )

add an @access tag to the tags array

Parameters:
string   $value:  should be either public or private


[ Top ]
addExample  [line 635]

  void addExample( string $value, string $path  )

adds an @example tag

Parameters:
string   $value:  contents of the tag
string   $path:  path to the file containing this tag


[ Top ]
addFileSource  [line 937]

  void addFileSource( string $path, array $source  )

Adds a new @filesource tag to the DocBlock

Parameters:
string   $path:  full path to the file
array   $source:  tokenized source code, ordered by line number

Information Tags:
Tutorial:  @filesource

[ Top ]
addFuncGlobal  [line 851]

  void addFuncGlobal( string $type, string $value  )

adds a function declaration of @global to the $funcglobals array

Parameters:
string   $type:  global type
string   $value:  description of how the global is used in the function


[ Top ]
addKeyword  [line 603]

  void addKeyword( string $keyword, parserStringWithInlineTags $value  )

Parameters:
string   $keyword:  tag name
parserStringWithInlineTags   $value:  the contents of the tag

API Tags:
Global:  array $_phpDocumentor_setting: used to determine whether to add the @internal tag or not


[ Top ]
addLink  [line 947]

  void addLink( string $link  )

creates a parserLinkTag and adds it to the $tags array

Parameters:
string   $link: 


[ Top ]
addName  [line 819]

  void addName( string $value  )

Adds a @name tag to the tag list

Parameters:
string   $value:  new name of element


[ Top ]
addPackage  [line 722]

  void addPackage( string $keyword, mixed $value  )

Parameters:
string   $keyword:  tag name (either package or subpackage)
mixed   $value:  either a string or a parserStringWithInlineTags. Strips all inline tags and use the text as the package


[ Top ]
addParam  [line 516]

  void addParam( string $paramVar, $paramType, parserStringWithInlineTags $value  )

Parameters:
string   $paramVar:  if empty, param is indexed in the order received and set using changeParam()
parserStringWithInlineTags   $value: 
   $paramType: 


[ Top ]
addReturn  [line 970]

  void addReturn( string $returnType, parserStringWithInlineTags $value  )

creates a parserReturnTag and adds it to the $tags array

Parameters:
string   $returnType:  the one-word name of the return type (mixed should be used if more than one type)
parserStringWithInlineTags   $value: 


[ Top ]
addSee  [line 958]

  void addSee( string $keyword, string $value  )

creates a parserLinkTag and adds it to the $tags array

Parameters:
string   $value: 
string   $keyword:  either see or uses


[ Top ]
addStaticVar  [line 838]

  void addStaticVar( string $staticvar, string $type, parserStringWithInlineTags $descrip  )

Parameters:
string   $staticvar:  if empty, staticvar is indexed in the order received and set using changeStatic()
string   $type:  data type
parserStringWithInlineTags   $descrip: 


[ Top ]
addTag  [line 583]

  void addTag( parserTag $tag  )

Used to insert DocBlock Template tags into a docblock

Parameters:
parserTag   $tag:  tag

API Tags:
Global:  array $_phpDocumentor_setting: used to determine whether to add ignored tags, or not


[ Top ]
addUnknownTag  [line 645]

  void addUnknownTag( string $keyword, string $value  )

adds an unknown tag to the $unknown_tags array for use by custom converters

Parameters:
string   $keyword:  tag name
string   $value:  tag value


[ Top ]
addUses  [line 1018]

  void addUses( string $seeel, parserStringWithInlineTags $description  )

Add a @uses tag to the DocBlock

Parameters:
string   $seeel:  @see-style text, used for Converter::getLink()
parserStringWithInlineTags   $description:  description of how the used element is used

Information Tags:
Tutorial:  @uses

[ Top ]
addVar  [line 987]

  void addVar( string $varType, parserStringWithInlineTags $value  )

creates a parserVarTag and adds it to the $tags array

Parameters:
string   $varType:  the one-word name of the variable type (mixed should be used if more than one type)
parserStringWithInlineTags   $value: 


[ Top ]
canSource  [line 316]

  void canSource( )

Tells the DocBlock it can have a @filesource tag

Only page-level DocBlocks may have a @filesource tag



[ Top ]
cantSource  [line 326]

  void cantSource( )

Tells the DocBlock it can't have a @filesource tag

Only page-level DocBlocks may have a @filesource tag



[ Top ]
changeGlobal  [line 860]

  void changeGlobal( integer $index, string $name  )

Parameters:
integer   $index:  index of parameter in the $funcglobals array
string   $name:  name of the parameter to set in the $funcglobals array


[ Top ]
changeParam  [line 533]

  void changeParam( integer $index, string $name, string|null $type  )

Parameters:
integer   $index:  index of parameter in the $params array
string   $name:  name of the parameter to set in the $params array
string|null   $type:  type of the parameter


[ Top ]
changeStatic  [line 870]

  void changeStatic( integer $index, string $name  )

Parameters:
integer   $index:  index of parameter in the $statics array
string   $name:  name of the parameter to set in the $statics array


[ Top ]
getDesc  [line 494]

  string getDesc( Converter &$converter  )

Parameters:
Converter   &$converter:  takes $desc and converts it to a string and returns it if present, otherwise returns ''


[ Top ]
getEndLineNumber  [line 290]

  integer getEndLineNumber( )

Retrieve ending line number



[ Top ]
getExplicitCategory  [line 713]

  boolean getExplicitCategory( )

If the DocBlock has a @category tag, then this returns true



[ Top ]
getExplicitPackage  [line 692]

  boolean getExplicitPackage( )

If the DocBlock has a @package tag, then this returns true



[ Top ]
getKeyword  [line 1041]

  mixed getKeyword( string $keyword  )

Parameters:
string   $keyword: 

API Tags:
Return:  false if no keyword, unconverted value if one keyword, array of unconverted values if more than one keyword


[ Top ]
getLineNumber  [line 272]

  integer getLineNumber( )

Retrieve starting line number



[ Top ]
getSDesc  [line 472]

  string getSDesc( Converter &$converter  )

Parameters:
Converter   &$converter:  takes $sdesc and converts it to a string and returns it if present, otherwise returns ''


[ Top ]
getType  [line 1090]

  string getType( )


API Tags:
Return:  always 'docblock'


[ Top ]
hasInheritDoc  [line 449]

  boolean hasInheritDoc( )

Wrapper for parserDesc::hasInheritDoc()



[ Top ]
listParams  [line 1056]

  array listParams( )


API Tags:
Return:  Format: array('var' => tag name, 'data' => unconverted tag value)


[ Top ]
listTags  [line 1074]

  void listTags( Converter 0  )

Parameters:
Converter   0: 


[ Top ]
overridePackage  [line 660]

  void overridePackage( string $category, string $package, string $subpackage, string $elname, string $type  )

set the element's package to the passed values. Used in phpDocumentor_IntermediateParser to align package of

elements inside a class or procedural page to the package of the class/procedural page

Parameters:
string   $category: 
string   $package: 
string   $subpackage: 
string   $elname:  element name
string   $type:  element type (include, define, var, method, global, function, const)


[ Top ]
postProcess  [line 300]

  void postProcess( )

Parse out any html tags from doc comments, and make them into

abstract structures


API Tags:
Uses:  parserDescParser::parse()


[ Top ]
replaceInheritDoc  [line 461]

  void replaceInheritDoc( parserDesc $desc  )

Wrapper for parserDesc::replaceInheritDoc()

Also replaces {@inheritdoc} in the $processed_desc

Parameters:
parserDesc   $desc: 


[ Top ]
resetParams  [line 524]

  void resetParams( )



[ Top ]
setDesc  [line 434]

  void setDesc( parserDesc|parserDocBlock $desc  )

Parameters:
parserDesc|parserDocBlock   $desc:  sets $desc


[ Top ]
setEndLineNumber  [line 281]

  void setEndLineNumber( integer $number  )

Sets the ending line number for the DocBlock

Parameters:
integer   $number: 


[ Top ]
setExplicitCategory  [line 704]

  void setExplicitCategory( )

Used if this docblock has a @category tag.

phpDocumentor will guess category for DocBlocks that don't have a @category tag


API Tags:
Uses:  parserDocBlock::$explicitcategory


[ Top ]
setExplicitPackage  [line 683]

  void setExplicitPackage( )

Used if this docblock has a @package tag.

phpDocumentor will guess package for DocBlocks that don't have a @package tag


API Tags:
Uses:  parserDocBlock::$explicitpackage


[ Top ]
setLineNumber  [line 263]

  void setLineNumber( integer $number  )

Sets the starting line number for the DocBlock

Parameters:
integer   $number: 


[ Top ]
setShortDesc  [line 392]

  void setShortDesc( parserDesc|parserDocBlock|parserTag $desc  )

Set the short description of the DocBlock

Setting the short description is possible by passing in one of three possible parameters:

  • another DocBlock's short description
  • another DocBlock, the short description will be extracted
  • a Zend Studio-compatible @desc tag

Parameters:
parserDesc|parserDocBlock|parserTag   $desc:  sets $sdesc


[ Top ]
setSource  [line 422]

  void setSource( string|array $source, [false|string $class = false]  )

Passes to parserStringWithInlineTags::setSource()

After passing, it calls postProcess() to set up the new source

Parameters:
string|array   $source:  tokenized highlight-ready source code
false|string   $class:  name of class if this is a method source


[ Top ]
updateGlobals  [line 880]

  void updateGlobals( array $funcs  )

replaces nameless global variables in the $funcglobals array with their names

Parameters:
array   $funcs: 


[ Top ]
updateModifiers  [line 351]

  void updateModifiers( array $modifiers  )

Parameters:
array   $modifiers: 


[ Top ]
updateParams  [line 548]

  void updateParams( array $params  )

replaces nameless parameters in the $params array with their names

add @param tags for params in the function with no entry

Parameters:
array   $params:  Format: array(parameter key => array(0 => parameter name[,1 => default value][,2 => type hint]),...)


[ Top ]
updateStatics  [line 895]

  void updateStatics( array $funcs  )

replaces nameless static variables in the $statics array with their names

Parameters:
array   $funcs: 


[ Top ]

Documentation generated on Tue, 24 Oct 2006 09:25:04 -0500 by phpDocumentor 1.3.1