Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: c:/www/apache/doc2//parser/PhpdocParserTags.php
PHPDOC 2000/12/03 - PHPDoc

PhpdocParserTags

PhpdocObject
   |
  +-- PhpdocParserRegExp
     |
    +-- PhpdocParserTags

Functions used to parse PHPDoc Tags.

 

private class PhpdocParserTags extends PhpdocParserRegExp

Functions used to parse PHPDoc Tags.

AuthorsUlf Wendel <ulf.wendel@phpdoc.de>
Version$Id: $

 
Direct known subclasses: PhpdocParserCore

Methods inherited from PhpdocParserRegExp

buildcomplexregexps

Methods inherited from PhpdocObject

setflagoutput, out, nametourl, outl, introspection

Private Method Summary

array

analyseTags(array $tags, array $data, array $allowed)

Extract the value from the given tags and copy the data to the $data array if its an allowed tag
array

analyseSeeTagRegs(array $regs)

Helperfunction to analyse see tags
array

getTags(string $phpdoc)

Extracts PHPDoc tags from a PHPDoc doc comment.
array

getTagPos(string $phpdoc, [ integer $offset ])

Find the position of the next phpdoc tag.
array

checkParserErrors(array $data, string $mode)

Takes an array filled by analyseTags() and converts the parse errors into a single error message.

Fields inherited from PhpdocParserRegExp

$phpdoc_tags, $c_base, $c_complex, $php_base, $php_complex, $tags

Fields inherited from PhpdocObject

$err, $application, $warn, $flag_output

Private Method Details

analyseTags

private array analyseTags( array $tags, array $data, array $allowed )

  Extract the value from the given tags and copy the data to the $data array if its an allowed tag

Parameter
array $tags
array of tags returned by getTags
array $data
array where the allowed tags and their values are copied to
array $allowed
array of allowed (recognized) tags
Returns array $data

Throws PhpdocError
See Also getTags()

analyseSeeTagRegs

private array analyseSeeTagRegs( array $regs )

  Helperfunction to analyse see tags

Parameter
array $regs
return by preg_match()
Returns array $see

[0] = error, $see[1] = data

See Also analyseTags()

getTags

private array getTags( string $phpdoc )

  Extracts PHPDoc tags from a PHPDoc doc comment.

Parameter
string $phpdoc
comment.
Returns array

List of tags ordered by their appearance containing the
tag name and it's (unparsed) value.

See Also getTagPos()

getTagPos

private array getTagPos( string $phpdoc, [ integer $offset ] )

  Find the position of the next phpdoc tag.

Parameter
string $phpdoc
integer $offset = >>0<<
Returns array $tag

0 => tag, 1 => offset


checkParserErrors

private array checkParserErrors( array $data, string $mode )

  Takes an array filled by analyseTags() and converts the parse errors into a single error message.
Checks for [syntaxerror], [notallowed] and [unknown] entries in the data hash,converts them into an error message and unsets the indizes. The functionreturns a hash containing the aggregates error message and the modifieddata hash.

Parameter
array $data
string $mode
Keyword where the data hash comes from eg. function/class...
Returns array

array ( $error_msg, $data )



Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta