From a8c2fbb13ab716a7580825c515a1b9358a5eeb4a Mon Sep 17 00:00:00 2001 From: craigmarvelley Date: Thu, 5 Jan 2012 16:37:12 +0000 Subject: [PATCH] Fixed bug causing annotations in inheriting controllers to be ignored --- ServiceDefinition/Loader/AnnotationClassLoader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ServiceDefinition/Loader/AnnotationClassLoader.php b/ServiceDefinition/Loader/AnnotationClassLoader.php index d76ec56..f545786 100644 --- a/ServiceDefinition/Loader/AnnotationClassLoader.php +++ b/ServiceDefinition/Loader/AnnotationClassLoader.php @@ -96,7 +96,7 @@ class AnnotationClassLoader implements LoaderInterface $serviceMethod = new Definition\Method( $annotation->getValue(), - $this->getController($method, $annotation) + $this->getController($class, $method, $annotation) ); } elseif ($annotation instanceof Annotation\Result) { if ($serviceReturn) { @@ -134,12 +134,12 @@ class AnnotationClassLoader implements LoaderInterface * * @return string */ - private function getController(\ReflectionMethod $method, Annotation\Method $annotation) + private function getController(\ReflectionClass $class, \ReflectionMethod $method, Annotation\Method $annotation) { if(null !== $annotation->getService()) { return $annotation->getService() . ':' . $method->name; } else { - return $method->class . '::' . $method->name; + return $class->name . '::' . $method->name; } }