function DocParser::instantiateAnnotiation
Try to instantiate the annotation and catch and process any exceptions related to failure
Parameters
class-string $name:
array<string,mixed> $arguments:
Return value
object
Throws
1 call to DocParser::instantiateAnnotiation()
- DocParser::Annotation in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php - Annotation ::= "@" AnnotationName MethodCall AnnotationName ::= QualifiedName | SimpleName QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName NameSpacePart ::= identifier | null | false |…
File
-
vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php, line 1480
Class
- DocParser
- A parser for docblock annotations.
Namespace
Doctrine\Common\AnnotationsCode
private function instantiateAnnotiation(string $originalName, string $context, string $name, array $arguments) {
try {
return new $name(...$arguments);
} catch (Throwable $exception) {
throw AnnotationException::creationError(sprintf('An error occurred while instantiating the annotation @%s declared on %s: "%s".', $originalName, $context, $exception->getMessage()), $exception);
}
}