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


Tutorials/Manuals:
Package-level: Files:
actions.php
bug-560532.php
bug-772441.php
builder.php
Classes.inc
clone.inc.php
clone5.inc.php
common.inc.php
config.php
EventStack.inc
file_dialog.php
HighlightParserTests.php
IntermediateParser.inc
IntermediateParserTests.php
Io.inc
new_phpdoc.php
ParserClassTests.php
ParserDescCleanup.inc
ParserPageTests.php
phpdoc.inc
phpdoc.php
phpDocumentorSetupTests.php
phpDocumentorTParserTests.php
ProceduralPages.inc
Publisher.inc
Setup.inc.php
top.php
utilities.php

subpackage DescHTML
DescHTML.inc

subpackage DocBlockTags
DocBlockTags.inc

subpackage Errors
Errors.inc

subpackage InlineTags
InlineTags.inc

subpackage Links
LinkClasses.inc

subpackage ParserData
ParserData.inc

subpackage ParserDocBlock
ParserDocBlock.inc

subpackage ParserElements
ParserElements.inc

subpackage Parsers
Beautifier.php
HighlightParser.inc
Parser.inc
phpDocumentorTParser.inc
Tokenizer.php
TutorialHighlightParser.inc
XMLpackagePageParser.inc

subpackage setup
find_phpdoc.php

subpackage Tutorial
PackagePageElements.inc

subpackage WordParsers
phpDocumentorTWordParser.inc
WordParser.inc

Classes:
Parsers
Parser
parserDescParser
phpDocumentorTParser
phpDocumentor_HighlightParser
phpDocumentor_HighlightWordParser
phpDocumentor_peardoc2_XML_Beautifier
phpDocumentor_TutorialHighlightParser
phpDocumentor_XML_Beautifier_Tokenizer
ppageParser
XMLPackagePageParser
bug_772441
Classes
EventStack
Io
phpDocumentor_IntermediateParser
phpDocumentor_setup
ProceduralPages
Publisher
tests_HighlightParserTests
tests_IntermediateParserTests
tests_ParserClassTests
tests_ParserPageTests
tests_phpDocumentorSetupTests
tests_phpDocumentorTParserTests
DescHTML
parserB
parserBr
parserCode
parserDescVar
parserI
parserKbd
parserList
parserPre
parserSamp
DocBlockTags
parserAccessTag
parserExampleTag
parserFileSourceTag
parserLicenseTag
parserLinkTag
parserMethodTag
parserNameTag
parserParamTag
parserPropertyReadTag
parserPropertyTag
parserPropertyWriteTag
parserReturnTag
parserSeeTag
parserStaticvarTag
parserTag
parserTutorialTag
parserUsedByTag
parserUsesTag
parserVarTag
Errors
ErrorTracker
RecordError
RecordWarning
InlineTags
parserExampleInlineTag
parserIdInlineTag
parserInheritdocInlineTag
parserInlineTag
parserLinkInlineTag
parserSourceInlineTag
parserTocInlineTag
parserTutorialInlineTag
Links
abstractLink
classLink
constLink
defineLink
functionLink
globalLink
methodLink
pageLink
tutorialLink
varLink
Tutorial
parserCData
parserEntity
parserXMLDocBookTag
ParserData
parserBase
parserData
parserPage
parserStringWithInlineTags
WordParsers
ObjectWordParser
phpDocumentorTWordParser
WordParser
ParserDocBlock
parserDesc
parserDocBlock
ParserElements
parserClass
parserConst
parserDefine
parserElement
parserFunction
parserGlobal
parserInclude
parserMethod
parserPackagePage
parserTutorial
parserVar

Class: phpDocumentor_HighlightParser

Source Location: /phpDocumentor/HighlightParser.inc

Class Overview

Publisher
 |
 --Parser
 |
 --phpDocumentorTParser
 |
 --phpDocumentor_HighlightParser

Highlights source code using parse()


Author(s):

Version:

  • Release: @VER@

Copyright:

  • 2002-2008 Gregory Beaver

Methods


Inherited Variables

Class: phpDocumentorTParser

phpDocumentorTParser::$inlineTagHandlers
phpDocumentorTParser::$source_location

Class: Publisher

Publisher::$subscriber

Inherited Methods

Class: phpDocumentorTParser

phpDocumentorTParser::phpDocumentorTParser()
Constructor
phpDocumentorTParser::parse()
Parse a new file

Class: Parser

Parser::Parser()
Set up invariant parsing variables
Parser::categoryTagHandler()
handles @category
Parser::checkEventPop()
this function checks whether parameter $word is a token for popping the current event off of the Event Stack.
Parser::checkEventPush()
this function checks whether parameter $word is a token for pushing a new event onto the Event Stack.
Parser::configWordParser()
tell the parser's WordParser $wp to set up tokens to parse words by.
Parser::defaultTagHandler()
Handles all standard tags that only have a description
Parser::endTag()
Called to clean up at the end of parsing a @tag in a docblock
Parser::exampleTagHandler()
handles @example
Parser::getParserEventName()
Debugging function, takes an event number and attempts to return its name
Parser::globalTagHandler()
handles @global
Parser::invalidTagHandler()
Handles tags like '@filesource' that only work in PHP 4.3.0+
Parser::packageTagHandler()
handles @package
Parser::paramTagHandler()
handles @param
Parser::parse()
Parse a new file
Parser::propertyTagHandler()
Handles @property(-read or -write) and @method magic tag
Parser::returnTagHandler()
handles @return
Parser::setupStates()
setup the parser tokens, and the pushEvent/popEvent arrays
Parser::staticvarTagHandler()
handles @staticvar
Parser::usesTagHandler()
handles @uses
Parser::varTagHandler()
handles @var

Class: Publisher

Publisher::publishEvent()
Publish an event
Publisher::subscribe()
Adds a subscriber to the $subscriber array().

Class Details

[line 226]
Highlights source code using parse()



Tags:

author: Gregory Beaver <[email protected]>
version: Release: @VER@
copyright: 2002-2008 Gregory Beaver
todo: CS cleanup - change class name to PhpDocumentor_*
todo: CS cleanup - change package to PhpDocumentor
since: 1.2.0beta3
usedby: parserExampleTag::ConvertSource() - highlights source code
usedby: parserFileSourceTag::ConvertSource() - highlights source code
usedby: parserExampleInlineTag::arrayConvert() - Parses the tokenized source
usedby: parserSourceInlineTag::arrayConvert() - Parses the tokenized source
license: LGPL


[ Top ]


Class Methods


constructor phpDocumentor_HighlightParser [line 2322]

void phpDocumentor_HighlightParser( )

Initialize the $tokenpushEvent, $wordpushEvent arrays



[ Top ]

method configWordParser [line 2231]

void configWordParser( array &$data)

Give the word parser necessary data to begin a new parse



Tags:

usedby: phpDocumentor_HighlightParser::parse() - pass $parse_data to prepare retrieval of tokens


Overrides Parser::configWordParser() (tell the parser's WordParser $wp to set up tokens to parse words by.)

Parameters:

array &$data all tokens separated by line number

[ Top ]

method newLineNum [line 346]

void newLineNum( )

wraps the current line (via the converter) and resets it to empty



Tags:

uses: Converter::SourceLine() - encloses $_line in a converter-specific format


[ Top ]

method parse [line 406]

bool parse( array &$parse_data, Converter &$converter, [bool $inlinesourceparse = false], [string|false $class = false], [false|integer $linenum = false], [false|string $filesourcepath = false])

Parse a new file

The parse() method is a do...while() loop that retrieves tokens one by one from the $_event_stack, and uses the token event array set up by the class constructor to call event handlers.

The event handlers each process the tokens passed to them, and use the _addoutput() method to append the processed tokens to the $_line variable. The word parser calls newLineNum() every time a line is reached.

In addition, the event handlers use special linking functions _link() and its cousins (_classlink(), etc.) to create in-code hyperlinks to the documentation for source code elements that are in the source code.




Tags:

staticvar: int $endrecur: used for recursion limiting if a handler for an event is not found
todo: CS cleanup - rename tokenizer_ext constant to uppercase
uses: phpDocumentor_HighlightParser::setupStates() - initialize parser state variables
uses: phpDocumentor_HighlightParser::configWordParser() - pass $parse_data to prepare retrieval of tokens


Overrides phpDocumentorTParser::parse() (Parse a new file)

Parameters:

array &$parse_data the parse data
Converter &$converter the converter object
bool $inlinesourceparse whether this data is from an inline {@source} tag
string|false $class if a string, it is the name of the class whose method we are parsing containing a {@source} tag
false|integer $linenum starting line number from {@source linenum}
false|string $filesourcepath full path to file with @filesource tag, if this is a @filesource parse

[ Top ]

method setLineNum [line 365]

void setLineNum( int $num)

Start the parsing at a certain line number



Parameters:

int $num line number

[ Top ]

method setupStates [line 2248]

void setupStates( bool $inlinesourceparse, false|string $class)

Initialize all parser state variables



Tags:

usedby: phpDocumentor_HighlightParser::parse() - initialize parser state variables
uses: $_wp - sets to a new phpDocumentor_HighlightWordParser


Overrides Parser::setupStates() (setup the parser tokens, and the pushEvent/popEvent arrays)

Parameters:

bool $inlinesourceparse true if we are highlighting an inline {@source} tag's output
false|string $class name of class we are going to start from

[ Top ]


Documentation generated on 2011年12月06日 07:12:56 -0600 by phpDocumentor 1.4.4

AltStyle によって変換されたページ (->オリジナル) /