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

Class: PHP_DocBlockGenerator_Block

Source Location: /PHP_DocBlockGenerator-1.1.2/PHP/DocBlockGenerator/Block.php

Class Overview


Creation of DocBlocks for PHP objects : includes, defines, globals, functions, classes, vars


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2007 Michel Corne

Methods


Inherited Variables

Inherited Methods


Class Details

[line 68]
Creation of DocBlocks for PHP objects : includes, defines, globals, functions, classes, vars

This class is only meant to be instanciated by the PHP_DocBlockGenerator_Tokens class. The package name is either passed as a parameter, or determined from the name of the first class of the first of all files to be processed.



[ Top ]


Method Detail

__construct (Constructor)   [line 201]

void __construct( object $tokens)

The class constructor

Sets properties that cannot be pre-set. This class is only meant to be instanciated by the PHP_DocBlockGenerator_Tokens class.

  • Access: public

Parameters:

object   $tokens   —  the PHP_DocBlockGenerator_Tokens instance

[ Top ]

build   [line 231]

void build( integer $id, [array $block = array()], [boolean $setDefautlDesc = true], [string $name = ''])

Builds the DocBlock

Sets the default DocBlock description. Builds the DocBlock frame with "*" (stars). Aligns the tags. Shifts the DocBlock 4 characters to the right for class methods and properties. Adds the DocBlock to the corresponding PHP object.

  • Access: public

Parameters:

integer   $id   —  the token identification number
array   $block   —  the DocBlock lines: description + tags
boolean   $setDefautlDesc   —  sets the default description if true
string   $name   —  the DocBlock name, e.g. "file"

[ Top ]

init   [line 285]

void init( array $param)

Initializes the Page-level tags
  • Access: public

Parameters:

array   $param   —  the tags/parameters values

[ Top ]

realign   [line 302]

void realign( integer $id, mixed $value)

Realignes the DocBlock tags
  • Access: public

Parameters:

integer   $id   —  the DocBlock token identification number
mixed   $value   —  the DocBlock content

[ Top ]

setClass   [line 318]

void setClass( integer $id)

Sets the class DocBlock

Extracts the class token. Sets the default package name on the first 2 words of the class. Builds the class DocBlock. Resets the class variables types cache.

  • Access: public

Parameters:

integer   $id   —  the class token identification number

[ Top ]

setConst   [line 361]

void setConst( integer $id)

Sets the class constant DocBlock

Extracts the constant value. Determines its type. Builds the constant DocBlock.

  • Access: public

Parameters:

integer   $id   —  the constant token identification number

[ Top ]

setDefine   [line 390]

void setDefine( integer $id)

Sets the define DocBlock

Extracts the constant value. Determines its type. Builds the define DocBlock.

  • Access: public

Parameters:

integer   $id   —  the define token identification number

[ Top ]

setFunction   [line 425]

void setFunction( integer $id)

Sets the function/method DocBlock

Extracts the function/method tokens. Extracts the function/method name. Extracts the function/method parameters and determines their type. Determine the function/method of data the function returns. Extracts the exceptions the function/method throws. Determines the scope and visibility of the method. Builds the function/method DocBlock.

  • Access: public

Parameters:

integer   $id   —  the function/method token identification number

[ Top ]

setGlobal   [line 538]

void setGlobal( integer $id, array $global, array $allTokens)

Sets the global variable DocBlock

Extracts the global variable. Determines its type. Builds the global variable DocBlock.

  • Access: public

Parameters:

integer   $id   —  the global variable token identification number
array   $global   —  the global variable token
array   $allTokens   —  the file tokens

[ Top ]

setGLOBALS   [line 557]

void setGLOBALS( integer $id, array $allTokens)

Sets the GLOBALS variable DocBlock

Extracts the global variable. Determines its type. Builds the global variable DocBlock.

  • Access: public

Parameters:

integer   $id   —  the GLOBALS variable identification number
array   $allTokens   —  the file tokens

[ Top ]

setPage   [line 583]

void setPage( integer $id)

Sets the Page-level DocBlock

Gets the license text. Sets the description placeholders. Sets the Page-level tags. Builds the Page-level DocBlock.

  • Access: public

Parameters:

integer   $id   —  the PHP open tag token identification number

[ Top ]

setVar   [line 652]

void setVar( array $var)

Sets the class variable DocBlock

Extracts the class variable name. Determines its type. Determines the scope and visibility of the class variable. Builds the variable DocBlock.

  • Access: public

Parameters:

array   $var   —  the variable token

[ Top ]


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