protected static function AnnotationNormalizer::getAnnotationType in JSON-RPC 8
Same name and namespace in other branches
- 2.x modules/jsonrpc_discovery/src/Normalizer/AnnotationNormalizer.php \Drupal\jsonrpc_discovery\Normalizer\AnnotationNormalizer::getAnnotationType()
Extract the annotation type.
Parameters
mixed $annotation: The annotated object.
Return value
string The type.
1 call to AnnotationNormalizer::getAnnotationType()
- AnnotationNormalizer::normalize in modules/
jsonrpc_discovery/ src/ Normalizer/ AnnotationNormalizer.php
File
- modules/
jsonrpc_discovery/ src/ Normalizer/ AnnotationNormalizer.php, line 94
Class
- AnnotationNormalizer
- The normalizer class for annotated objects.
Namespace
Drupal\jsonrpc_discovery\NormalizerCode
protected static function getAnnotationType($annotation) {
switch (get_class($annotation)) {
case JsonRpcMethod::class:
return 'JsonRpcMethod';
case JsonRpcParameterDefinition::class:
return 'JsonRpcParameterDefinition';
default:
return get_class($annotation);
}
}