You are here

public static function AnnotationException::enumeratorError in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php \Doctrine\Common\Annotations\AnnotationException::enumeratorError()

Creates a new AnnotationException describing a invalid enummerator.

@since 2.4

Parameters

string $attributeName:

string $annotationName:

string $context:

array $available:

mixed $given:

Return value

AnnotationException

1 call to AnnotationException::enumeratorError()
DocParser::Annotation in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
Annotation ::= "@" AnnotationName MethodCall AnnotationName ::= QualifiedName | SimpleName QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName NameSpacePart ::= identifier | null | false |…

File

modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php, line 166

Class

AnnotationException
Description of AnnotationException

Namespace

Doctrine\Common\Annotations

Code

public static function enumeratorError($attributeName, $annotationName, $context, $available, $given) {
  return new self(sprintf('[Enum Error] Attribute "%s" of @%s declared on %s accept only [%s], but got %s.', $attributeName, $annotationName, $context, implode(', ', $available), is_object($given) ? get_class($given) : $given));
}