Doctrine


Doctrine\Common\Annotations\AnnotationReader
/Doctrine/Common/Annotations/AnnotationReader.php at line 41

Class AnnotationReader

AnnotationReader

public class AnnotationReader

A reader for docblock annotations.

License:
http://www.opensource.org/licenses/lgpl-license.php LGPL
See Also:
www.doctrine-project.org
Since:
2.0
Version:
$Revision: 3938 $
Author:
Benjamin Eberlei
Guilherme Blanco
Jonathan Wage
Roman Borschel

Constructor Summary

AnnotationReader(Cache cache)

Constructor.

Method Summary
The

getClassAnnotation(mixed class, string annotation, $class )

Gets a class annotation.

array

getClassAnnotations(string|ReflectionClass class)

Gets the annotations applied to a class.

The

getMethodAnnotation(ReflectionMethod method, string annotation)

Gets a method annotation.

array

getMethodAnnotations(mixed method, string|ReflectionClass class, string|ReflectionMethod property)

Gets the annotations applied to a method.

The

getPropertyAnnotation(ReflectionProperty property, string annotation)

Gets a property annotation.

array

getPropertyAnnotations(string|ReflectionProperty property, string|ReflectionClass class)

Gets the annotations applied to a property.

void

setAnnotationNamespaceAlias(mixed namespace, mixed alias, $alias )

Sets an alias for an annotation namespace.

void

setDefaultAnnotationNamespace(string defaultNamespace)

Sets the default namespace that the AnnotationReader should assume for annotations with not fully qualified names.

Constructor Detail

/Doctrine/Common/Annotations/AnnotationReader.php at line 71

AnnotationReader

public AnnotationReader(Cache cache)

Constructor. Initializes a new AnnotationReader that uses the given Cache provider.

Parameters:
cache - The cache provider to use. If none is provided, ArrayCache is used.

Method Detail

/Doctrine/Common/Annotations/AnnotationReader.php at line 128

getClassAnnotation

public The getClassAnnotation(mixed class, string annotation, $class )

Gets a class annotation.

Parameters:
annotation - The name of the annotation.
Returns:
Annotation or NULL, if the requested annotation does not exist.

/Doctrine/Common/Annotations/AnnotationReader.php at line 106

getClassAnnotations

public array getClassAnnotations(string|ReflectionClass class)

Gets the annotations applied to a class.

Parameters:
class - The name or ReflectionClass of the class from which the class annotations should be read.
Returns:
An array of Annotations.

/Doctrine/Common/Annotations/AnnotationReader.php at line 202

getMethodAnnotation

public The getMethodAnnotation(ReflectionMethod method, string annotation)

Gets a method annotation.

Parameters:
annotation - The name of the annotation.
Returns:
Annotation or NULL, if the requested annotation does not exist.

/Doctrine/Common/Annotations/AnnotationReader.php at line 179

getMethodAnnotations

public array getMethodAnnotations(mixed method, string|ReflectionClass class, string|ReflectionMethod property)

Gets the annotations applied to a method.

Parameters:
class - The name or ReflectionClass of the class that owns the method.
property - The name or ReflectionMethod of the method from which the annotations should be read.
Returns:
An array of Annotations.

/Doctrine/Common/Annotations/AnnotationReader.php at line 165

getPropertyAnnotation

public The getPropertyAnnotation(ReflectionProperty property, string annotation)

Gets a property annotation.

Parameters:
annotation - The name of the annotation.
Returns:
Annotation or NULL, if the requested annotation does not exist.

/Doctrine/Common/Annotations/AnnotationReader.php at line 142

getPropertyAnnotations

public array getPropertyAnnotations(string|ReflectionProperty property, string|ReflectionClass class)

Gets the annotations applied to a property.

Parameters:
class - The name or ReflectionClass of the class that owns the property.
property - The name or ReflectionProperty of the property from which the annotations should be read.
Returns:
An array of Annotations.

/Doctrine/Common/Annotations/AnnotationReader.php at line 94

setAnnotationNamespaceAlias

public void setAnnotationNamespaceAlias(mixed namespace, mixed alias, $alias )

Sets an alias for an annotation namespace.


/Doctrine/Common/Annotations/AnnotationReader.php at line 83

setDefaultAnnotationNamespace

public void setDefaultAnnotationNamespace(string defaultNamespace)

Sets the default namespace that the AnnotationReader should assume for annotations with not fully qualified names.


Doctrine