public function DocParser::parse in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php \Doctrine\Common\Annotations\DocParser::parse()
Parses the given docblock string for annotations.
Parameters
string $input The docblock string to parse.:
string $context The parsing context.:
Return value
array Array of annotations. If no annotations are found, an empty array is returned.
File
- vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php, line 322
Class
- DocParser
- A parser for docblock annotations.
Namespace
Doctrine\Common\AnnotationsCode
public function parse($input, $context = '') {
$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();
}