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

Class: phpDocumentorTWordParser

Source Location: /PhpDocumentor-1.4.0/phpDocumentor/phpDocumentorTWordParser.inc

Class Overview

WordParser
   |
   --phpDocumentorTWordParser

Like WordParser, but expects an array of tokens from the tokenizer instead of a string.


Author(s):

Version:

  • $Id: WordParser.inc,v 1.3 2006/04/30 22:18:14 cellog Exp $

Methods


Child classes:

phpDocumentor_HighlightWordParser
Retrieve tokens from an array of tokens organized by line numbers

Inherited Variables

Inherited Methods

Class: WordParser

WordParser::backupPos()
Backup to the previous token so that it can be retrieved again in a new context.
WordParser::getBlock()
Unused
WordParser::getPos()
Returns the current pointer position, or 1 character after the end of the word
WordParser::getSource()
Retrieve source code for the last function/method
WordParser::getWord()
Retrieve a token from the token list
WordParser::setPos()
Set the internal cursor within the source code
WordParser::setSeperator()
WordParser::setup()
Initialize the WordParser
WordParser::setWhitespace()
set parser to return or strip whitespace

Class Details

[line 46]
Like WordParser, but expects an array of tokens from the tokenizer instead of a string.
  • Author: Greg Beaver <cellog@php.net>
  • Version: $Id: WordParser.inc,v 1.3 2006/04/30 22:18:14 cellog Exp $
  • Since: 1.2


[ Top ]


Method Detail

addFileSource   [line 234]

void addFileSource( array $word)

Wrapper for addSource() used to retrieve the entire source code

organized by line number in setup()


Parameters:

array   $word   —  full file source code

[ Top ]

addSource   [line 254]

void addSource( array|string $word, [boolean $file = false], array|string 2)

Generate source token arrays organized by line number

This code will split up tokens that contain "\n" and add them to the source code as separate tokens on different lines.

  • Uses: _set_sars()

Parameters:

array|string   2   —  next token, for lookahead splitting
array|string   $word   —  token to add
boolean   $file   —  true if this should be added to $_file_source

[ Top ]

backupPos   [line 305]

void backupPos( )


Overridden in child classes as:

phpDocumentor_HighlightWordParser::backupPos()
back the word parser to the previous token as defined by $last_token

Overrides WordParser::backupPos() (Backup to the previous token so that it can be retrieved again in a new context.)
[ Top ]

concatTokens   [line 158]

void concatTokens( $a)

Utility function to convert a series of tokens into a string

Parameters:

   $a   — 

[ Top ]

findGlobal   [line 296]

void findGlobal( array $tokens)

Tell the phpDocumentorTWordParser to return the entire global variable if it is found.
  • Uses: $_global_search

Parameters:

array   $tokens   —  tokens that represent the global variable definition

[ Top ]

getFileSource   [line 126]

array getFileSource( )


[ Top ]

getSource   [line 115]

array getSource( )


Overrides WordParser::getSource() (Retrieve source code for the last function/method)
[ Top ]

getWord   [line 181]

string|array getWord( )

Retrieve a token for the phpDocumentorTParser

  • Return: token from tokenizer

Overridden in child classes as:

phpDocumentor_HighlightWordParser::getWord()
Retrieve the next token

Overrides WordParser::getWord() (Retrieve a token from the token list)
[ Top ]

setup   [line 99]

void setup( &$input)

Uses http://www.php.net/token_get_all to tokenize the source code.

  • Var: source code

Overridden in child classes as:

phpDocumentor_HighlightWordParser::setup()

Overrides WordParser::setup() (Initialize the WordParser)

Parameters:

   &$input   — 

[ Top ]

tokenEquals   [line 147]

void tokenEquals( $a, $b)

Utility function to determine whether two tokens from the tokenizer are equal

Parameters:

   $a   — 
   $b   — 

[ Top ]


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