annotate vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2 /*
Chris@0 3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Chris@0 4 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Chris@0 5 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Chris@0 6 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Chris@0 7 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Chris@0 8 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Chris@0 9 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Chris@0 10 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Chris@0 11 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Chris@0 12 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Chris@0 13 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Chris@0 14 *
Chris@0 15 * This software consists of voluntary contributions made by many individuals
Chris@0 16 * and is licensed under the MIT license. For more information, see
Chris@0 17 * <http://www.doctrine-project.org>.
Chris@0 18 */
Chris@0 19
Chris@0 20 namespace Doctrine\Common\Annotations;
Chris@0 21
Chris@0 22 /**
Chris@0 23 * Interface for annotation readers.
Chris@0 24 *
Chris@0 25 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
Chris@0 26 */
Chris@0 27 interface Reader
Chris@0 28 {
Chris@0 29 /**
Chris@0 30 * Gets the annotations applied to a class.
Chris@0 31 *
Chris@0 32 * @param \ReflectionClass $class The ReflectionClass of the class from which
Chris@0 33 * the class annotations should be read.
Chris@0 34 *
Chris@0 35 * @return array An array of Annotations.
Chris@0 36 */
Chris@0 37 function getClassAnnotations(\ReflectionClass $class);
Chris@0 38
Chris@0 39 /**
Chris@0 40 * Gets a class annotation.
Chris@0 41 *
Chris@0 42 * @param \ReflectionClass $class The ReflectionClass of the class from which
Chris@0 43 * the class annotations should be read.
Chris@0 44 * @param string $annotationName The name of the annotation.
Chris@0 45 *
Chris@0 46 * @return object|null The Annotation or NULL, if the requested annotation does not exist.
Chris@0 47 */
Chris@0 48 function getClassAnnotation(\ReflectionClass $class, $annotationName);
Chris@0 49
Chris@0 50 /**
Chris@0 51 * Gets the annotations applied to a method.
Chris@0 52 *
Chris@0 53 * @param \ReflectionMethod $method The ReflectionMethod of the method from which
Chris@0 54 * the annotations should be read.
Chris@0 55 *
Chris@0 56 * @return array An array of Annotations.
Chris@0 57 */
Chris@0 58 function getMethodAnnotations(\ReflectionMethod $method);
Chris@0 59
Chris@0 60 /**
Chris@0 61 * Gets a method annotation.
Chris@0 62 *
Chris@0 63 * @param \ReflectionMethod $method The ReflectionMethod to read the annotations from.
Chris@0 64 * @param string $annotationName The name of the annotation.
Chris@0 65 *
Chris@0 66 * @return object|null The Annotation or NULL, if the requested annotation does not exist.
Chris@0 67 */
Chris@0 68 function getMethodAnnotation(\ReflectionMethod $method, $annotationName);
Chris@0 69
Chris@0 70 /**
Chris@0 71 * Gets the annotations applied to a property.
Chris@0 72 *
Chris@0 73 * @param \ReflectionProperty $property The ReflectionProperty of the property
Chris@0 74 * from which the annotations should be read.
Chris@0 75 *
Chris@0 76 * @return array An array of Annotations.
Chris@0 77 */
Chris@0 78 function getPropertyAnnotations(\ReflectionProperty $property);
Chris@0 79
Chris@0 80 /**
Chris@0 81 * Gets a property annotation.
Chris@0 82 *
Chris@0 83 * @param \ReflectionProperty $property The ReflectionProperty to read the annotations from.
Chris@0 84 * @param string $annotationName The name of the annotation.
Chris@0 85 *
Chris@0 86 * @return object|null The Annotation or NULL, if the requested annotation does not exist.
Chris@0 87 */
Chris@0 88 function getPropertyAnnotation(\ReflectionProperty $property, $annotationName);
Chris@0 89 }