public function SimpleAnnotationReader::getMethodAnnotation in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php \Doctrine\Common\Annotations\SimpleAnnotationReader::getMethodAnnotation()
Gets a method annotation.
Parameters
\ReflectionMethod $method The ReflectionMethod to read the annotations from.:
string $annotationName The name of the annotation.:
Return value
object|null The Annotation or NULL, if the requested annotation does not exist.
Overrides Reader::getMethodAnnotation
File
- modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ SimpleAnnotationReader.php, line 103
Class
- SimpleAnnotationReader
- Simple Annotation Reader.
Namespace
Doctrine\Common\AnnotationsCode
public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) {
foreach ($this
->getMethodAnnotations($method) as $annot) {
if ($annot instanceof $annotationName) {
return $annot;
}
}
return null;
}