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

Class: parserDescParser

Source Location: /PhpDocumentor-1.2.0beta2/phpDocumentor/ParserDescCleanup.inc

Class Overview

Publisher
   |
   --Parser
      |
      --parserDescParser

Parses a DocBlock description to retrieve abstract representations of


Author(s):

Version:

  • $Id: Parser.inc,v 1.174 2003/01/01 07:23:11 CelloG Exp $

Variables

Methods


Inherited Variables

Inherited Methods

Class: Parser

Parser::Parser()
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::getParserEventName()
Debugging function, takes an event number and attempts to return its name
Parser::parse()
Parse a new file
Parser::setupStates()
setup the parser tokens, and the pushEvent/popEvent arrays

Class: Publisher

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

Class Details

[line 196]
Parses a DocBlock description to retrieve abstract representations of

<pre>

,,

,

    ,
      ,
    1. ,,



[ Top ]


Class Variables

$eventHandlers = array(PHPDOCUMENTOR_PDP_EVENT_CODE => 'handleCode',
                               PHPDOCUMENTOR_PDP_EVENT_PRE => 'handlePre',
                               PHPDOCUMENTOR_PDP_EVENT_P => 'handleP',
                               PHPDOCUMENTOR_PDP_EVENT_DOUBLECR => 'handleDoubleCR',
                               PHPDOCUMENTOR_PDP_EVENT_LIST => 'handleList',
                               PHPDOCUMENTOR_PDP_EVENT_B => 'handleB',
                               PHPDOCUMENTOR_PDP_EVENT_I => 'handleI',
                               PHPDOCUMENTOR_PDP_EVENT_BR => 'handleBr',
                               PARSER_EVENT_NOEVENTS => 'defaultHandler',
                               )

[line 201]


Type:   array


[ Top ]

$pars = array()

[line 215]


Type:   array


[ Top ]

$parse_Ps =

[line 221]

Determines whether parsing of <p> tags will occur, or double CR will

be used


Type:   boolean


[ Top ]



Method Detail

parserDescParser (Constructor)   [line 228]

parserDescParser parserDescParser( )

sets $wp to be a ObjectWordParser

$wp is the word parser that retrieves tokens


[ Top ]

addText   [line 348]

void addText( mixed $text)

add input as text to the current paragraph or list

[ Top ]

defaultHandler   [line 331]

void defaultHandler( mixed $word, mixed $pevent)

basic handling

This function checks to see if the first thing in a description is the <p> tag. If so, it will switch into a mode of parsing out paragraphs by <p> instead of a double line-break

It also removes extra whitespace


[ Top ]

getParserEventName   [line 720]

void getParserEventName( mixed $value)


Overrides Parser::getParserEventName() (Debugging function, takes an event number and attempts to return its name)
[ Top ]

handleB   [line 497]

void handleB( mixed $word, mixed $pevent)


[ Top ]

handleBr   [line 367]

void handleBr( mixed $word, mixed $pevent)

Handle "

"

Add a new parserBr


[ Top ]

handleCode   [line 469]

void handleCode( mixed $word, mixed $pevent)


[ Top ]

handleDoubleCR   [line 573]

void handleDoubleCR( mixed $word, mixed $pevent)


[ Top ]

handleI   [line 515]

void handleI( mixed $word, mixed $pevent)


[ Top ]

handleList   [line 386]

void handleList( mixed $word, mixed $pevent)

Handles
    ,
  1. ,

    This allows parsing of lists nested to any level. Using the lists and list_item temporary variables and using list_count to control nesting, the method creates a parserList for each

      or
        tag, and a standard parserStringWithInlineTags for all the text, adding in nested lists as if they were inline tags (the conversion interface is the same for both object types)


        [ Top ]

        handleP   [line 533]

        void handleP( mixed $word, mixed $pevent)


        [ Top ]

        handlePre   [line 483]

        void handlePre( mixed $word, mixed $pevent)


        [ Top ]

        parse   [line 241]

        void parse( array &$parse_data, [boolean $sdesc = false], [string $ind_type = 'parserDesc'])

        Parse a long or short description for tags

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

        Parameters:

        array   &$parse_data     array of strings or parserInlineTags
        boolean   $sdesc     true if the description is a short description. (only 1 paragraph allowed in short desc)
        string   $ind_type     name of the class to instantiate for each paragraph. parserDesc for desc/sdesc, parserStringWithInlineTags for tag data

        [ Top ]

        setupStates   [line 626]

        void setupStates( boolean $sdesc)

        setup the parser tokens, and the pushEvent/popEvent arrays

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

        Parameters:

        boolean   $sdesc     determines whether to allow paragraph parsing

        [ Top ]


        Documentation generated on Fri, 30 Apr 2004 22:10:22 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.