Class parserDocBlock

(line 129)

Description


Located in File: /phpDocumentor/ParserDocBlock.inc

Represents a docblock and its components, $desc, $sdesc, $tags, and also $params for functions


Class Variables

Summary:
string $category
false|integer $endlinenumber
array $funcglobals
boolean $hasaccess
boolean $hasname
false|integer $linenumber
string $package
array $params
mixed $properties
mixed $return
array $statics
string $subpackage
array $tags
mixed $var

$category (line 219)

Data type : string

$desc = false (line 134)

Data type : parserDesc

$endlinenumber = false (line 158)

Data type : false|integer

Line number in the source on which this docblock ends
  • since: - 1.2

$explicitcategory = false (line 217)

Data type : boolean

fix for bug 708559

$explicitpackage = false (line 212)

Data type : boolean

fix for bug 591396

$funcglobals = array() (line 184)

Data type : array

array of global variable data.

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

$hasaccess = false (line 227)

Data type : boolean

whether this DocBlock has an @access tag

$hasname = false (line 231)

Data type : boolean

whether this DocBlock has a @name tag

$linenumber = false (line 152)

Data type : false|integer

Line number in the source on which this docblock begins
  • since: - 1.2

$package = 'default' (line 221)

Data type : string

$packagedescrip = '' (line 237)

Data type : string

description of package parsed from @package tag

Unused in this version

$params = array() (line 176)

Data type : array

array of param data.

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

$processed_desc = false (line 138)

Data type : array

$processed_sdesc = false (line 142)

Data type : array

$properties = array() (line 197)

Data type : mixed

array of parserPropertyTag, parserPropertyReadTag, parserPropertyWriteTag, parserMethodTag magic tags

$return = false (line 202)

Data type : mixed

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

$sdesc = false (line 146)

Data type : parserDesc

$statics = array() (line 193)

Data type : array

array of static variable data.

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

$subpackage = '' (line 223)

Data type : string

$subpackagedescrip = '' (line 243)

Data type : string

description of subpackage parsed from @package tag

Unused in this version

$tags = array() (line 163)

Data type : array

array of parserTags

$unknown_tags = array() (line 168)

Data type : array

array of unrecognized parserTags

$var = false (line 207)

Data type : mixed

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

Class Constants

Summary:

Method Detail

Summary:
parserDocBlock parserDocBlock ()
void addAccess (string $value)
void addExample (string $value, string $path)
void addFileSource (string $path, array $source)
void addFuncGlobal (string $type, string $value)
void addKeyword (string $keyword, parserStringWithInlineTags $value)
void addLink (string $link)
void addName (string $value)
void addPackage (string $keyword, mixed $value)
void addParam (string $paramVar,  $paramType, parserStringWithInlineTags $value)
void addProperty ( $tagName,  $propertyName,  $propertyType,  $value)
void addReturn (string $returnType, parserStringWithInlineTags $value)
void addSee (string $keyword, string $value)
void addStaticVar (string $staticvar, string $type, parserStringWithInlineTags $descrip)
void addTag (parserTag $tag)
void addUnknownTag (string $keyword, string $value)
void addUses (string $seeel, parserStringWithInlineTags $description)
void addVar (string $varType, parserStringWithInlineTags $value)
void canSource ()
void cantSource ()
void changeGlobal (integer $index, string $name)
void changeParam (integer $index, string $name, string|null $type)
void changeStatic (integer $index, string $name)
string getDesc (Converter &$converter)
integer getEndLineNumber ()
boolean getExplicitCategory ()
boolean getExplicitPackage ()
mixed getKeyword (string $keyword)
integer getLineNumber ()
string getSDesc (Converter &$converter)
string getType ()
boolean hasInheritDoc ()
array listParams ()
array listProperties ()
void listTags (Converter 0)
void overridePackage (string $category, string $package, string $subpackage, string $elname, string $type)
void postProcess ()
void resetParams ()
void setEndLineNumber (integer $number)
void setLineNumber (integer $number)
void setSource (string|array $source, [false|string $class = false])
void updateGlobals (array $funcs)
void updateModifiers (array $modifiers)
void updateParams (array $params)
void updateStatics (array $funcs)

Constructor parserDocBlock (line 256)

parserDocBlock parserDocBlock( )

sets package to default

Info

Method addAccess (line 916)

void addAccess( string $value)

add an @access tag to the tags array

Parameters

  • string $value: should be either public or private

Info

Method addExample (line 641)

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

Info

Method addFileSource (line 943)

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

Info

Method addFuncGlobal (line 857)

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

Info

Method addKeyword (line 609)

void addKeyword( string $keyword, parserStringWithInlineTags $value)

Parameters

Info

Method addLink (line 953)

void addLink( string $link)

creates a parserLinkTag and adds it to the $tags array

Parameters

  • string $link:

Info

Method addName (line 825)

void addName( string $value)

Adds a @name tag to the tag list

Parameters

  • string $value: new name of element

Info

Method addPackage (line 728)

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

Info

Method addParam (line 520)

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

Parameters

Info

Method addProperty (line 1033)

void addProperty( $tagName, $propertyName, $propertyType, $value)

Adds a @property(-read or -write) or @method magic tag to the DocBlock

Parameters

  • $tagName:
  • $propertyName:
  • $propertyType:
  • $value:

Info

Method addReturn (line 976)

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:

Info

Method addSee (line 964)

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

Info

Method addStaticVar (line 844)

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

Parameters

Info

Method addTag (line 587)

void addTag( parserTag $tag)

Used to insert DocBlock Template tags into a docblock

Parameters

Info

Method addUnknownTag (line 651)

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

Info

Method addUses (line 1024)

void addUses( string $seeel, parserStringWithInlineTags $description)

Add a @uses tag to the DocBlock

Parameters

Info

Method addVar (line 993)

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:

Info

Method canSource (line 320)

void canSource( )

Tells the DocBlock it can have a @filesource tag

Only page-level DocBlocks may have a @filesource tag

Info

Method cantSource (line 330)

void cantSource( )

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

Only page-level DocBlocks may have a @filesource tag

Info

Method changeGlobal (line 866)

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

Info

Method changeParam (line 537)

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

Info

Method changeStatic (line 876)

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

Info

Method getDesc (line 498)

string getDesc( Converter &$converter)

Parameters

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

Info

Method getEndLineNumber (line 294)

integer getEndLineNumber( )

Retrieve ending line number

Info

Method getExplicitCategory (line 719)

boolean getExplicitCategory( )

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

Info

Method getExplicitPackage (line 698)

boolean getExplicitPackage( )

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

Info

Method getKeyword (line 1076)

mixed getKeyword( string $keyword)

Parameters

  • string $keyword:

Info

  • return - false if no keyword, unconverted value if one keyword, array of unconverted values if more than one keyword

Method getLineNumber (line 276)

integer getLineNumber( )

Retrieve starting line number

Info

Method getSDesc (line 476)

string getSDesc( Converter &$converter)

Parameters

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

Info

Method getType (line 1141)

string getType( )

Info

  • return - always 'docblock'

Method hasInheritDoc (line 453)

boolean hasInheritDoc( )

Wrapper for parserDesc::hasInheritDoc()

Info

Method listParams (line 1091)

array listParams( )

Info

  • return - Format: array('var' => tag name, 'data' => unconverted tag value)

Method listProperties (line 1109)

array listProperties( )

Info

  • return - Format: array('var' => tag name, 'data' => unconverted tag value)

Method listTags (line 1125)

void listTags( Converter 0)

Parameters

Info

Method overridePackage (line 666)

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)

Info

Method postProcess (line 304)

void postProcess( )

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

abstract structures

Info

Method replaceInheritDoc (line 465)

void replaceInheritDoc( parserDesc $desc)

Wrapper for parserDesc::replaceInheritDoc()

Also replaces {@inheritdoc} in the $processed_desc

Parameters

Info

Method resetParams (line 528)

void resetParams( )

Info

Method setDesc (line 438)

void setDesc( parserDesc|parserDocBlock $desc)

Parameters

Info

Method setEndLineNumber (line 285)

void setEndLineNumber( integer $number)

Sets the ending line number for the DocBlock

Parameters

  • integer $number:

Info

Method setExplicitCategory (line 710)

void setExplicitCategory( )

Used if this docblock has a @category tag.

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

Info

Method setExplicitPackage (line 689)

void setExplicitPackage( )

Used if this docblock has a @package tag.

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

Info

Method setLineNumber (line 267)

void setLineNumber( integer $number)

Sets the starting line number for the DocBlock

Parameters

  • integer $number:

Info

Method setShortDesc (line 396)

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

Info

Method setSource (line 426)

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

Info

Method updateGlobals (line 886)

void updateGlobals( array $funcs)

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

Parameters

  • array $funcs:

Info

Method updateModifiers (line 355)

void updateModifiers( array $modifiers)

Parameters

  • array $modifiers:

Info

Method updateParams (line 552)

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]),...)

Info

Method updateStatics (line 901)

void updateStatics( array $funcs)

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

Parameters

  • array $funcs:

Info

Inherited Variables

Inherited Class Variable Summary

Inherited Methods

Inherited Method Summary


Documentation generated on Mon, 05 Dec 2011 21:28:40 -0600 by phpDocumentor 1.4.4