PHP Class Neos\Flow\Reflection\DocCommentParser

Mostra file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$description string The description as found in the doc comment
$tags array An array of tag names and their values (multiple values are possible)

Public Methods

Method Description
getDescription ( ) : string Returns the description which has been previously parsed
getTagValues ( string $tagName ) : array Returns the values of the specified tag. The doc comment must be parsed with parseDocComment() before tags are available.
getTagsValues ( ) : array Returns the tags which have been previously parsed
isTaggedWith ( string $tagName ) : boolean Checks if a tag with the given name exists
parseDocComment ( string $docComment ) : void 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.

Protected Methods

Method Description
parseTag ( string $line ) : void Parses a line of a doc comment for a tag and its value.

Method Details

getDescription() public method

Returns the description which has been previously parsed
public getDescription ( ) : string
return string The description which has been parsed

getTagValues() public method

Returns the values of the specified tag. The doc comment must be parsed with parseDocComment() before tags are available.
public getTagValues ( string $tagName ) : array
$tagName string The tag name to retrieve the values for
return array The tag's values

getTagsValues() public method

Returns the tags which have been previously parsed
public getTagsValues ( ) : array
return array Array of tag names and their (multiple) values

isTaggedWith() public method

Checks if a tag with the given name exists
public isTaggedWith ( string $tagName ) : boolean
$tagName string The tag name to check for
return boolean TRUE the tag exists, otherwise FALSE

parseDocComment() public method

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.
public parseDocComment ( string $docComment ) : void
$docComment string A doc comment as returned by the reflection getDocComment() method
return void

parseTag() protected method

The result is stored in the internal tags array.
protected parseTag ( string $line ) : void
$line string A line of a doc comment which starts with an @-sign
return void

Property Details

$description protected_oe property

The description as found in the doc comment
protected string $description
return string

$tags protected_oe property

An array of tag names and their values (multiple values are possible)
protected array $tags
return array