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

Class: parserTag

Source Location: /phpDocumentor/DocBlockTags.inc

Class Overview

parserBase
   |
   --parserStringWithInlineTags
      |
      --parserTag

used to represent standard tags like @access, etc.


Author(s):

Version:

  • Release: @VER@

Copyright:

  • 2002-2008 Gregory Beaver

Variables

Methods


Child classes:

parserNameTag
This class represents the @name tag
parserAccessTag
This class represents the @access tag
parserReturnTag
represents the "@return" tag
parserLinkTag
represents the "@link" tag
parserFileSourceTag
represents "@filesource"

Inherited Variables

Inherited Methods

Class: parserStringWithInlineTags

parserStringWithInlineTags::add()
equivalent to the . operator ($a = $b . $c)
parserStringWithInlineTags::Convert()
Use to convert the string to a real string with all inline tags parsed and linked
parserStringWithInlineTags::getString()
return the string unconverted (all inline tags are taken out - this should only be used in pre-parsing to see if any other text is in the string)
parserStringWithInlineTags::hasInlineTag()
Determine whether the string contains any inline tags
parserStringWithInlineTags::setSource()
Pass source code to any {@source} tags contained within the string for later conversion.
parserStringWithInlineTags::trimmedStrlen()
equivalent to trim(strlen($string))

Class: parserBase

parserBase::getType()
gets the type
parserBase::getValue()
gets the value
parserBase::setValue()
sets the given value

Class Details

[line 62]
used to represent standard tags like @access, etc.

This class is aware of inline tags, and will automatically handle them using inherited functions




Tags:

author:  Greg Beaver <cellog@php.net>
version:  Release: @VER@
copyright:  2002-2008 Gregory Beaver
link:  http://pear.php.net/PhpDocumentor
link:  http://www.phpdoc.org
todo:  CS cleanup - change package to PhpDocumentor
todo:  CS cleanup - change classname to PhpDocumentor_*
since:  1.0rc1
license:  LGPL


[ Top ]


Class Variables

$keyword =  ''

[line 74]

tag name (see, access, etc.)


Type:   string


[ Top ]

$type =  '_tag'

[line 69]

Type is used by many functions to skip the hassle of

if phpDocumentor_get_class($blah) == 'parserBlah' always '_tag'



Type:   string
Overrides:   Array


[ Top ]



Class Methods


constructor parserTag [line 86]

parserTag parserTag( string $keyword, parserStringWithInlineTags $value, [boolean $noparse = false])

Set up the tag

  1. function parserTag($keyword$value$noparse false)
  2.     {
  3.         $this->keyword $keyword;
  4.         if (!$noparse{
  5.             $parser new parserDescParser;
  6.             $parser->subscribe('*'$this);
  7.             $parser->parse($value->valuetrue'parserstringwithinlinetags');
  8.         else 
  9.             $this->value $value
  10.         }
  11.     }




Parameters:

string   $keyword   tag name
parserStringWithInlineTags   $value   tag value
boolean   $noparse   whether to parse the $value for html tags

[ Top ]

method Convert [line 108]

string Convert( Converter &$converter)

Perform the output conversion on this parserTag using the output converter that is passed in



Tags:

see:  Converter
todo:  CS cleanup - rename to convert for camelCase rule


Overridden in child classes as:

parserNameTag::Convert()
process this tag through the given output converter
parserAccessTag::Convert()
process this tag through the given output converter
parserReturnTag::Convert()
process this tag through the given output converter (sets up the $converted_returnType)
parserSeeTag::Convert()
process this tag through the given output converter
parserUsesTag::Convert()
Return a link to documentation for other element, and description of how it is used
parserUsedByTag::Convert()
process this tag through the given output converter
parserTutorialTag::Convert()
process this tag through the given output converter
parserFileSourceTag::Convert()
Return a link to the highlighted source and generate the source

Overrides parserStringWithInlineTags::Convert() (Use to convert the string to a real string with all inline tags parsed and linked)

Parameters:

Converter   &$converter   the converter object

[ Top ]

method getString [line 173]

string getString( )

Returns the text minus any inline tags



Tags:

return:  the text minus any inline tags
see:  parserStringWithInlineTags::getString()


Overridden in child classes as:

parserAccessTag::getString()
No inline tags are possible, returns 'public', 'protected' or 'private'

Overrides parserStringWithInlineTags::getString() (return the string unconverted (all inline tags are taken out - this should only be used in pre-parsing to see if any other text is in the string))

[ Top ]

method HandleEvent [line 162]

void HandleEvent( integer $a, array $desc)

Called by the parserDescParser when processing a description.



Tags:

see:  parserTag::parserTag()
todo:  CS cleanup - rename to handleEvent for camelCase rule


Parameters:

integer   $a   not used
array   $desc   array of parserStringWithInlineTags representing paragraphs in the tag description

[ Top ]


Documentation generated on Tue, 06 Dec 2011 07:12:03 -0600 by phpDocumentor 1.4.4