TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\Reflection\DocCommentParser Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Reflection\DocCommentParser:
Tx_Extbase_Reflection_DocCommentParser

Public Member Functions

 parseDocComment ($docComment)
 
 getTagsValues ()
 
 getTagValues ($tagName)
 
 isTaggedWith ($tagName)
 
 getDescription ()
 

Protected Member Functions

 parseTag ($line)
 

Protected Attributes

 $description = ''
 
 $tags = array()
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! A little parser which creates tag objects from doc comments

Definition at line 19 of file DocCommentParser.php.

Member Function Documentation

◆ getDescription()

TYPO3\CMS\Extbase\Reflection\DocCommentParser::getDescription ( )

Returns the description which has been previously parsed

Returns
string The description which has been parsed

Definition at line 93 of file DocCommentParser.php.

References TYPO3\CMS\Extbase\Reflection\DocCommentParser\$description.

◆ getTagsValues()

TYPO3\CMS\Extbase\Reflection\DocCommentParser::getTagsValues ( )

Returns the tags which have been previously parsed

Returns
array Array of tag names and their (multiple) values

Definition at line 58 of file DocCommentParser.php.

References TYPO3\CMS\Extbase\Reflection\DocCommentParser\$tags.

◆ getTagValues()

TYPO3\CMS\Extbase\Reflection\DocCommentParser::getTagValues (   $tagName)

Returns the values of the specified tag. The doc comment must be parsed with parseDocComment() before tags are available.

Parameters
string$tagNameThe tag name to retrieve the values for
Exceptions

Definition at line 71 of file DocCommentParser.php.

References TYPO3\CMS\Extbase\Reflection\DocCommentParser\isTaggedWith().

◆ isTaggedWith()

TYPO3\CMS\Extbase\Reflection\DocCommentParser::isTaggedWith (   $tagName)

Checks if a tag with the given name exists

Parameters
string$tagNameThe tag name to check for
Returns
boolean TRUE the tag exists, otherwise FALSE

Definition at line 84 of file DocCommentParser.php.

Referenced by TYPO3\CMS\Extbase\Reflection\DocCommentParser\getTagValues().

◆ parseDocComment()

TYPO3\CMS\Extbase\Reflection\DocCommentParser::parseDocComment (   $docComment)

Parses the given doc comment and saves the result (description and tags) in the parser's object. They can be retrieved by the getTags() getTagValues() and getDescription() methods.

Parameters
string$docCommentA doc comment as returned by the reflection getDocComment() method
Returns
void

Definition at line 39 of file DocCommentParser.php.

References TYPO3\CMS\Extbase\Reflection\DocCommentParser\parseTag().

◆ parseTag()

TYPO3\CMS\Extbase\Reflection\DocCommentParser::parseTag (   $line)
protected

Parses a line of a doc comment for a tag and its value. The result is stored in the interal tags array.

Parameters
string$lineA line of a doc comment which starts with an -sign
Returns
void

Definition at line 104 of file DocCommentParser.php.

Referenced by TYPO3\CMS\Extbase\Reflection\DocCommentParser\parseDocComment().

Member Data Documentation

◆ $description

TYPO3\CMS\Extbase\Reflection\DocCommentParser::$description = ''
protected

◆ $tags

TYPO3\CMS\Extbase\Reflection\DocCommentParser::$tags = array()
protected