Chris@0: . Chris@0: */ Chris@0: Chris@0: namespace Doctrine\Common\Annotations; Chris@0: Chris@0: /** Chris@0: * Interface for annotation readers. Chris@0: * Chris@0: * @author Johannes M. Schmitt Chris@0: */ Chris@0: interface Reader Chris@0: { Chris@0: /** Chris@0: * Gets the annotations applied to a class. Chris@0: * Chris@0: * @param \ReflectionClass $class The ReflectionClass of the class from which Chris@0: * the class annotations should be read. Chris@0: * Chris@0: * @return array An array of Annotations. Chris@0: */ Chris@0: function getClassAnnotations(\ReflectionClass $class); Chris@0: Chris@0: /** Chris@0: * Gets a class annotation. Chris@0: * Chris@0: * @param \ReflectionClass $class The ReflectionClass of the class from which Chris@0: * the class annotations should be read. Chris@0: * @param string $annotationName The name of the annotation. Chris@0: * Chris@0: * @return object|null The Annotation or NULL, if the requested annotation does not exist. Chris@0: */ Chris@0: function getClassAnnotation(\ReflectionClass $class, $annotationName); Chris@0: Chris@0: /** Chris@0: * Gets the annotations applied to a method. Chris@0: * Chris@0: * @param \ReflectionMethod $method The ReflectionMethod of the method from which Chris@0: * the annotations should be read. Chris@0: * Chris@0: * @return array An array of Annotations. Chris@0: */ Chris@0: function getMethodAnnotations(\ReflectionMethod $method); Chris@0: Chris@0: /** Chris@0: * Gets a method annotation. Chris@0: * Chris@0: * @param \ReflectionMethod $method The ReflectionMethod to read the annotations from. Chris@0: * @param string $annotationName The name of the annotation. Chris@0: * Chris@0: * @return object|null The Annotation or NULL, if the requested annotation does not exist. Chris@0: */ Chris@0: function getMethodAnnotation(\ReflectionMethod $method, $annotationName); Chris@0: Chris@0: /** Chris@0: * Gets the annotations applied to a property. Chris@0: * Chris@0: * @param \ReflectionProperty $property The ReflectionProperty of the property Chris@0: * from which the annotations should be read. Chris@0: * Chris@0: * @return array An array of Annotations. Chris@0: */ Chris@0: function getPropertyAnnotations(\ReflectionProperty $property); Chris@0: Chris@0: /** Chris@0: * Gets a property annotation. Chris@0: * Chris@0: * @param \ReflectionProperty $property The ReflectionProperty to read the annotations from. Chris@0: * @param string $annotationName The name of the annotation. Chris@0: * Chris@0: * @return object|null The Annotation or NULL, if the requested annotation does not exist. Chris@0: */ Chris@0: function getPropertyAnnotation(\ReflectionProperty $property, $annotationName); Chris@0: }