final class DocParser

A parser for docblock annotations.

It is strongly discouraged to change the default annotation parsing process.

@author Benjamin Eberlei <kontakt@beberlei.de> @author Guilherme Blanco <guilhermeblanco@hotmail.com> @author Jonathan Wage <jonwage@gmail.com> @author Roman Borschel <roman@code-factory.org> @author Johannes M. Schmitt <schmittjoh@gmail.com> @author Fabio B. Silva <fabio.bat.silva@gmail.com>

Hierarchy

  • class \Doctrine\Common\Annotations\DocParser

Expanded class hierarchy of DocParser

2 files declare their use of DocParser

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/DocParser.php, line 40

Namespace

Doctrine\Common\Annotations
View source

Members

Namesort descending Modifiers Type Description Overrides
DocParser::$annotationMetadata private static property Hash-map for caching annotation metadata
DocParser::$classExists private property This hashmap is used internally to cache results of class_exists() look-ups.
DocParser::$classIdentifiers private static property An array of all valid tokens for a class name.
DocParser::$context private property
DocParser::$ignoredAnnotationNames private property A list with annotations that are not causing exceptions when not resolved to an annotation class.
DocParser::$ignoreNotImportedAnnotations private property Whether annotations that have not been imported should be ignored.
DocParser::$imports private property Hashmap containing all use-statements that are to be used when parsing the given doc block.
DocParser::$isNestedAnnotation private property Flag to control if the current annotation is nested or not.
DocParser::$lexer private property The lexer.
DocParser::$metadataParser private static property Doc Parser used to collect annotation target
DocParser::$namespaces private property An array of default namespaces if operating in simple mode.
DocParser::$target private property Current target context
DocParser::$typeMap private static property Hash-map for handle types declaration
DocParser::addNamespace public function Sets the default namespaces.
DocParser::Annotation private function Annotation ::= "@" AnnotationName ["(" [Values] ")"] AnnotationName ::= QualifiedName | SimpleName QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName NameSpacePart ::= identifier…
DocParser::Annotations private function Annotations ::= Annotation {[ "*" ]* [Annotation]}*
DocParser::ArrayEntry private function ArrayEntry ::= Value | KeyValuePair KeyValuePair ::= Key ("=" | ":") PlainValue | Constant Key ::= string | integer | Constant
DocParser::Arrayx private function Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}"
DocParser::classExists private function Attempt to check if a class exists or not. This never goes through the PHP autoloading mechanism but uses the {@link AnnotationRegistry} to load classes.
DocParser::collectAnnotationMetadata private function Collects parsing metadata for a given annotation class
DocParser::Constant private function Constant ::= integer | string | float | boolean
DocParser::FieldAssignment private function FieldAssignment ::= FieldName "=" PlainValue FieldName ::= identifier
DocParser::Identifier private function Identifier ::= string
DocParser::match private function Attempts to match the given token with the current lookahead token. If they match, updates the lookahead token; otherwise raises a syntax error.
DocParser::matchAny private function Attempts to match the current lookahead token with any of the given tokens.
DocParser::parse public function Parses the given docblock string for annotations.
DocParser::PlainValue private function PlainValue ::= integer | string | float | boolean | Array | Annotation
DocParser::setIgnoredAnnotationNames public function Sets the annotation names that are ignored during the parsing process.
DocParser::setIgnoreNotImportedAnnotations public function Sets ignore on not-imported annotations
DocParser::setImports public function Sets the imports
DocParser::setTarget public function Sets current target context as bitmask.
DocParser::syntaxError private function Generates a new syntax error.
DocParser::Value private function Value ::= PlainValue | FieldAssignment
DocParser::Values private function Values ::= Array | Value {"," Value}*
DocParser::__construct public function Constructs a new DocParser.