DocParser
final class DocParser (View source)
| internal |
A parser for docblock annotations.
This Drupal version allows for ignoring annotations when namespaces are present.
Methods
Constructs a new DocParser.
Sets the annotation names that are ignored during the parsing process.
Sets ignore on not-imported annotations.
Sets the default namespaces.
Sets the imports.
Sets current target context as bitmask.
Parses the given docblock string for annotations.
Details
__construct()
Constructs a new DocParser.
void
setIgnoredAnnotationNames(array $names)
Sets the annotation names that are ignored during the parsing process.
The names are supposed to be the raw names as used in the class, not the fully qualified class names.
void
setIgnoreNotImportedAnnotations(bool $bool)
Sets ignore on not-imported annotations.
void
addNamespace(array $namespace)
Sets the default namespaces.
void
setImports(array $imports)
Sets the imports.
void
setTarget(int $target)
Sets current target context as bitmask.
array
parse(string $input, string $context = '')
Parses the given docblock string for annotations.