if (isset($attributesMetadata[$attributeName])) { $attributeMetadata =
$attributesMetadata[$attributeName];
} else { $attributesMetadata[$attributeName] =
$attributeMetadata =
new AttributeMetadata($attributeName);
$classMetadata->
addAttributeMetadata($attributeMetadata);
} } foreach ($this->
loadAnnotations($method) as $annotation) { if ($annotation instanceof Groups
) { if (!
$accessorOrMutator) { throw new MappingException(sprintf('Groups on "%s::%s()" cannot be added. Groups can only be added on methods beginning with "get", "is", "has" or "set".',
$className,
$method->name
));
} foreach ($annotation->
getGroups() as $group) { $attributeMetadata->
addGroup($group);
} } elseif ($annotation instanceof MaxDepth
) { if (!
$accessorOrMutator) { throw new MappingException(sprintf('MaxDepth on "%s::%s()" cannot be added. MaxDepth can only be added on methods beginning with "get", "is", "has" or "set".',
$className,
$method->name
));
} $attributeMetadata->
setMaxDepth($annotation->
getMaxDepth());
}