Neos\Flow\Reflection\DocCommentParser::getTagValues PHP Метод

getTagValues() публичный Метод

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
Результат array The tag's values
    public function getTagValues($tagName)
    {
        if (!$this->isTaggedWith($tagName)) {
            throw new Exception('Tag "' . $tagName . '" does not exist.', 1169128255);
        }
        return $this->tags[$tagName];
    }

Usage Example

 /**
  * @test
  */
 public function eolCharacterCanBeNewlineOrCarriageReturn()
 {
     $parser = new DocCommentParser();
     $parser->parseDocComment('/**' . chr(10) . ' * @var $foo integer' . chr(13) . chr(10) . ' * @var $bar string' . chr(10) . ' */');
     $this->assertEquals(['$foo integer', '$bar string'], $parser->getTagValues('var'));
 }