MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
Referência à classe AnnotationReader

Membros públicos

 __construct (Cache $cache=null, Parser $parser=null)
 
 setDefaultAnnotationNamespace ($defaultNamespace)
 
 setAnnotationCreationFunction (Closure $func)
 
 setAnnotationNamespaceAlias ($namespace, $alias)
 
 setAutoloadAnnotations ($bool)
 
 getAutoloadAnnotations ()
 
 getClassAnnotations (ReflectionClass $class)
 
 getClassAnnotation (ReflectionClass $class, $annotation)
 
 getPropertyAnnotations (ReflectionProperty $property)
 
 getPropertyAnnotation (ReflectionProperty $property, $annotation)
 
 getMethodAnnotations (ReflectionMethod $method)
 
 getMethodAnnotation (ReflectionMethod $method, $annotation)
 

Descrição detalhada

Documentação dos Construtores & Destrutor

◆ __construct()

__construct ( Cache $cache = null,
Parser $parser = null )

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

Parâmetros
Cache$cacheThe cache provider to use. If none is provided, ArrayCache is used.
Parser$parserThe parser to use. If none is provided, the default parser is used.

Definido na linha 67 do ficheiro AnnotationReader.php.

Documentação das funções

◆ getAutoloadAnnotations()

getAutoloadAnnotations ( )

Gets a flag whether to try to autoload annotation classes.

Veja também
setAutoloadAnnotations
Retorna
boolean

Definido na linha 132 do ficheiro AnnotationReader.php.

◆ getClassAnnotation()

getClassAnnotation ( ReflectionClass $class,
$annotation )

Gets a class annotation.

Parâmetros
$class
string$annotationThe name of the annotation.
Retorna
The Annotation or NULL, if the requested annotation does not exist.

Definido na linha 166 do ficheiro AnnotationReader.php.

◆ getClassAnnotations()

getClassAnnotations ( ReflectionClass $class)

Gets the annotations applied to a class.

Parâmetros
string | ReflectionClass$classThe name or ReflectionClass of the class from which the class annotations should be read.
Retorna
array An array of Annotations.

Definido na linha 144 do ficheiro AnnotationReader.php.

◆ getMethodAnnotation()

getMethodAnnotation ( ReflectionMethod $method,
$annotation )

Gets a method annotation.

Parâmetros
ReflectionMethod$method
string$annotationThe name of the annotation.
Retorna
The Annotation or NULL, if the requested annotation does not exist.

Definido na linha 242 do ficheiro AnnotationReader.php.

◆ getMethodAnnotations()

getMethodAnnotations ( ReflectionMethod $method)

Gets the annotations applied to a method.

Parâmetros
string | ReflectionClass$classThe name or ReflectionClass of the class that owns the method.
string | ReflectionMethod$propertyThe name or ReflectionMethod of the method from which the annotations should be read.
Retorna
array An array of Annotations.

Definido na linha 219 do ficheiro AnnotationReader.php.

◆ getPropertyAnnotation()

getPropertyAnnotation ( ReflectionProperty $property,
$annotation )

Gets a property annotation.

Parâmetros
ReflectionProperty$property
string$annotationThe name of the annotation.
Retorna
The Annotation or NULL, if the requested annotation does not exist.

Definido na linha 204 do ficheiro AnnotationReader.php.

◆ getPropertyAnnotations()

getPropertyAnnotations ( ReflectionProperty $property)

Gets the annotations applied to a property.

Parâmetros
string | ReflectionClass$classThe name or ReflectionClass of the class that owns the property.
string | ReflectionProperty$propertyThe name or ReflectionProperty of the property from which the annotations should be read.
Retorna
array An array of Annotations.

Definido na linha 181 do ficheiro AnnotationReader.php.

◆ setAnnotationCreationFunction()

setAnnotationCreationFunction ( Closure $func)

Sets the custom function to use for creating new annotations on the underlying parser.

The function is supplied two arguments. The first argument is the name of the annotation and the second argument an array of values for this annotation. The function is assumed to return an object or NULL. Whenever the function returns NULL for an annotation, the implementation falls back to the default annotation creation process of the underlying parser.

Parâmetros
Closure$func

Definido na linha 96 do ficheiro AnnotationReader.php.

◆ setAnnotationNamespaceAlias()

setAnnotationNamespaceAlias ( $namespace,
$alias )

Sets an alias for an annotation namespace.

Parâmetros
$namespace
$alias

Definido na linha 107 do ficheiro AnnotationReader.php.

◆ setAutoloadAnnotations()

setAutoloadAnnotations ( $bool)

Sets a flag whether to try to autoload annotation classes, as well as to distinguish between what is an annotation and what not by triggering autoloading.

NOTE: Autoloading of annotation classes is inefficient and requires silently failing autoloaders. In particular, setting this option to TRUE renders this AnnotationReader incompatible with a ClassLoader.

Parâmetros
boolean$boolBoolean flag.

Definido na linha 121 do ficheiro AnnotationReader.php.

◆ setDefaultAnnotationNamespace()

setDefaultAnnotationNamespace ( $defaultNamespace)

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

Parâmetros
string$defaultNamespace

Definido na linha 79 do ficheiro AnnotationReader.php.


A documentação para esta classe foi gerada a partir do seguinte ficheiro: