phprs\util\DocParser::parse PHP Method

parse() public method

Parses the given docblock string for annotations.
public parse ( string $input, string $context = '', $record_doc ) : array
$input string The docblock string to parse.
$context string The parsing context.
return array Array of annotations. If no annotations are found, an empty array is returned.
    public function parse($input, $context = '', $record_doc)
    {
        $pos = $this->findInitialTokenPosition($input);
        if ($pos === null) {
            return array();
        }
        $this->context = $context;
        $this->lexer->setInput(trim(substr($input, $pos), '* /'));
        $this->lexer->moveNext();
        return $this->Annotations($record_doc);
    }