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

Class: PHP_DocBlockGenerator_Tokens

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

Class Overview


Extraction of the PHP objects/tokens of the source code and creation of the DocBlocks


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2007 Michel Corne

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 54]
Extraction of the PHP objects/tokens of the source code and creation of the DocBlocks


[ Top ]


Class Variables

$eol =

[line 72]

The source code End-Of-Line character

EOL = "\r\n" for DOS/Windows, "\r" for MAC, "\n" for Unix

  • Access: public

Type:   string


[ Top ]

$hasBlock =

[line 80]

Flag indicating if the current token has a DocBlock or not
  • Access: public

Type:   boolean


[ Top ]

$id =

[line 88]

The current token information, including the token type, access type...
  • Access: public

Type:   array


[ Top ]

$inClass =

[line 96]

Flag indicating if the current token is within a class
  • Access: public

Type:   integer


[ Top ]

$isInterface =

[line 104]

Flag indicating if the class is an interface
  • Access: public

Type:   boolean


[ Top ]

$phpVersion =  ''

[line 131]

The file PHP version
  • Access: public

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 147]

void __construct( )

The class constructor
  • Access: public

[ Top ]

get   [line 160]

array get( integer $id)

Gets the current token
  • Return: the token type and value, false if invalid ID
  • Access: public

Parameters:

integer   $id   —  the token identification number

[ Top ]

process   [line 241]

boolean process( string $data, array $param)

Processes the source code tokens

Gets all the source code tokens. Determines the source code EOL. Determines the file PHP version. Initializes the Page-level tags. Parses the file tokens and creates their DocBlocks. Re-assembles all the tokens with their DocBlocks.

  • Return: true on success, false on failure
  • Access: public

Parameters:

string   $data   —  the source code
array   $param   —  the tags/parameters values

[ Top ]

set   [line 407]

boolean set( integer $id, string $value)

Sets the token value
  • Return: true if the token is valid, false otherwise
  • Access: public

Parameters:

integer   $id   —  the token identification number
string   $value   —  the token value

[ Top ]

slice   [line 423]

array slice( [integer $offset = 0], [string $openBracket = null], [mixed $closeBracket = null], [integer $bracketCount = null])

Slices a subset of tokens
  • Return: the sliced tokens
  • Access: public

Parameters:

integer   $offset   —  the token identification number to start looking at
string   $openBracket   —  the delimiter to start slicing at
mixed   $closeBracket   —  the delimiter to stop slicing at
integer   $bracketCount   —  to set to 1 if the offset is past the first delimiter

[ Top ]


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