// Next will be nested
$this->isNestedAnnotation = true;
//if annotation does not support current target
if (0
=== (self::
$annotationMetadata[$name]['targets'
] &
$target) &&
$target) { throw AnnotationException::
semanticalError( sprintf('Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s.',
$originalName,
$this->context, self::
$annotationMetadata[$name]['targets_literal'
]) );
} $values =
$this->
MethodCall();
if (isset(self::
$annotationMetadata[$name]['enum'
])) { // checks all declared attributes
foreach (self::
$annotationMetadata[$name]['enum'
] as $property =>
$enum) { // checks if the attribute is a valid enumerator
if (isset($values[$property]) && !
in_array($values[$property],
$enum['value'
])) { throw AnnotationException::
enumeratorError($property,
$name,
$this->context,
$enum['literal'
],
$values[$property]);
} } }