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