PHP Класс Neos\Flow\Reflection\ReflectionService

Reflection of classes of all active packages is triggered through the bootstrap's initializeReflectionService() method. In a development context, single classes may be re-reflected once files are modified whereas in a production context reflection is done once and successive requests read from the frozen caches for performance reasons. The list of available classes is determined by the CompiletimeObjectManager which also triggers the initial build of reflection data in this service. The invalidation of reflection cache entries is done by the CacheManager which in turn is triggered by signals sent by the file monitor. The internal representation of cache data is optimized for memory consumption and speed by using constants which have an integer value.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$annotatedClasses array Array of annotation classnames and the names of classes which are annotated with them
$annotationReader Doctrine\Common\Annotations\Reader
$availableClassNames array
$classLoader Neos\Flow\Core\ClassLoader
$classReflectionData array Array with reflection information indexed by class name
$classSchemata array<\Neos\Flow\Reflection\ClassSchema> Schemata of all classes which can be persisted
$classSchemataRuntimeCache Neos\Cache\Frontend\VariableFrontend
$classesByMethodAnnotations array Array of method annotations and the classes and methods which are annotated with them
$classesCurrentlyBeingForgotten array An array of class names which are currently being forgotten by forgetClass(). Acts as a safeguard against infinite loops.
$context Neos\Flow\Core\ApplicationContext
$doctrinePhpParser Doctrine\Common\Annotations\PhpParser Note: Don't refer to this member directly but use getDoctrinePhpParser() to obtain an instance
$environment Neos\Flow\Utility\Environment
$initialized boolean
$loadFromClassSchemaRuntimeCache boolean In Production context, with frozen caches, this flag will be TRUE
$packageManager Neos\Flow\Package\PackageManagerInterface
$reflectionDataCompiletimeCache Neos\Cache\Frontend\VariableFrontend
$reflectionDataRuntimeCache Neos\Cache\Frontend\VariableFrontend
$settings array
$statusCache Neos\Cache\Frontend\StringFrontend
$systemLogger Neos\Flow\Log\SystemLoggerInterface
$updatedReflectionData array Array with updated reflection information (e.g. in Development context after classes have changed)
$useStatementsForClassCache array a cache which stores the use statements reflected for a particular class (only relevant for un-expanded "var" and "param" annotations)

Открытые методы

Метод Описание
buildReflectionData ( array $availableClassNames ) : void Builds the reflection data cache during compile time.
freezePackageReflection ( string $packageKey ) : void Stores the current reflection data related to classes of the specified package in the PrecompiledReflectionData directory for the current context.
getAllClassNames ( ) : array Returns the names of all classes known to this reflection service.
getAllImplementationClassNamesForInterface ( string $interfaceName ) : array Searches for and returns all class names of implementations of the given object type (interface name). If no class implementing the interface was found, an empty array is returned.
getAllSubClassNamesForClass ( string $className ) : array Searches for and returns all names of classes inheriting the specified class.
getClassAnnotation ( string $className, string $annotationClassName ) : object Returns the specified class annotation or NULL.
getClassAnnotations ( string $className, string $annotationClassName = null ) : array Returns the specified class annotations or an empty array
getClassNameByObject ( object $object ) : string Returns the class name of the given object. This is a convenience method that returns the expected class names even for proxy classes.
getClassNamesByAnnotation ( string $annotationClassName ) : array Searches for and returns all names of classes which are tagged by the specified annotation. If no classes were found, an empty array is returned.
getClassPropertyNames ( string $className ) : array Returns the names of all properties of the specified class
getClassSchema ( mixed $classNameOrObject ) : ClassSchema Returns the class schema for the given class
getClassesContainingMethodsAnnotatedWith ( string $annotationClassName ) : array Returns all class names of classes containing at least one method annotated with the given annotation class
getDefaultImplementationClassNameForInterface ( string $interfaceName ) : mixed Searches for and returns the class name of the default implementation of the given interface name. If no class implementing the interface was found or more than one implementation was found in the package defining the interface, FALSE is returned.
getMethodAnnotation ( string $className, string $methodName, string $annotationClassName ) : object Returns the specified method annotation or NULL.
getMethodAnnotations ( string $className, string $methodName, string $annotationClassName = null ) : array Returns the specified method annotations or an empty array
getMethodDeclaredReturnType ( string $className, string $methodName ) : string Returns the declared return type of a method (for PHP < 7.0 this will always return null)
getMethodParameters ( string $className, string $methodName ) : array Returns an array of parameters of the given method. Each entry contains additional information about the parameter position, type hint etc.
getMethodTagsValues ( string $className, string $methodName ) : array Returns all tags and their values the specified method is tagged with
getMethodsAnnotatedWith ( string $className, string $annotationClassName ) : array Returns all names of methods of the given class that are annotated with the given annotation class
getPropertyAnnotation ( string $className, string $propertyName, string $annotationClassName ) : object Returns the specified property annotation or NULL.
getPropertyAnnotations ( string $className, string $propertyName, string $annotationClassName = null ) : array Returns the specified property annotations or an empty array
getPropertyNamesByAnnotation ( string $className, string $annotationClassName ) : array Searches for and returns all names of class properties which are marked by the specified annotation. If no properties were found, an empty array is returned.
getPropertyNamesByTag ( string $className, string $tag ) : array Searches for and returns all names of class properties which are tagged by the specified tag.
getPropertyTagValues ( string $className, string $propertyName, string $tag ) : array Returns the values of the specified class property tag
getPropertyTagsValues ( string $className, string $propertyName ) : array Returns all tags and their values the specified class property is tagged with
hasMethod ( string $className, string $methodName ) : boolean Wrapper for method_exists() which tells if the given method exists.
injectClassLoader ( ClassLoader $classLoader ) : void
injectEnvironment ( Environment $environment ) : void
injectPackageManager ( Neos\Flow\Package\PackageManagerInterface $packageManager ) : void
injectSettings ( array $settings ) : void
injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void
isClassAbstract ( string $className ) : boolean Tells if the specified class is abstract or not
isClassAnnotatedWith ( string $className, string $annotationClassName ) : boolean Tells if the specified class has the given annotation
isClassFinal ( string $className ) : boolean Tells if the specified class is final or not
isClassImplementationOf ( string $className, string $interfaceName ) : boolean Tells if the specified class implements the given interface
isClassReflected ( string $className ) : boolean Tells if the specified class is known to this reflection service and reflection information is available.
isClassUnconfigurable ( string $className ) : boolean Tells if the class is unconfigurable or not
isMethodAnnotatedWith ( string $className, string $methodName, string $annotationClassName ) : boolean Tells if the specified method has the given annotation
isMethodFinal ( string $className, string $methodName ) : boolean Tells if the specified method is final or not
isMethodPrivate ( string $className, string $methodName ) : boolean Tells if the specified method is private
isMethodProtected ( string $className, string $methodName ) : boolean Tells if the specified method is protected
isMethodPublic ( string $className, string $methodName ) : boolean Tells if the specified method is public
isMethodStatic ( string $className, string $methodName ) : boolean Tells if the specified method is declared as static or not
isMethodTaggedWith ( string $className, string $methodName, string $tag ) : boolean Tells if the specified method is tagged with the given tag
isPropertyAnnotatedWith ( string $className, string $propertyName, string $annotationClassName ) : boolean Tells if the specified property has the given annotation
isPropertyPrivate ( string $className, string $propertyName ) : boolean Tells if the specified property is private
isPropertyTaggedWith ( string $className, string $propertyName, string $tag ) : boolean Tells if the specified class property is tagged with the given tag
reflectClassProperty ( string $className, PropertyReflection $property ) : integer
saveToCache ( ) : void Exports the internal reflection data into the ReflectionData cache
setClassSchemataRuntimeCache ( Neos\Cache\Frontend\VariableFrontend $cache ) : void Sets the dedicated class schema cache for runtime purposes
setReflectionDataCompiletimeCache ( Neos\Cache\Frontend\VariableFrontend $cache ) : void Sets the compile-time data cache
setReflectionDataRuntimeCache ( Neos\Cache\Frontend\VariableFrontend $cache ) : void Sets the runtime data cache
setStatusCache ( StringFrontend $cache ) : void Sets the status cache
unfreezePackageReflection ( string $packageKey ) : void Removes the precompiled reflection data of a frozen package

Защищенные методы

Метод Описание
addImplementedInterface ( string $className, ClassReflection $interface )
addParentClass ( string $className, ClassReflection $parentClass ) : void
addPropertiesToClassSchema ( ClassSchema $classSchema ) : void Adds properties of the class at hand to the class schema.
buildClassSchema ( string $className ) : ClassSchema Builds a class schema for the given class name.
buildClassSchemata ( array $classNames ) : void Builds class schemata from classes annotated as entities or value objects
checkValueObjectRequirements ( string $className ) : void Checks if the given class meets the requirements for a value object, i.e.
cleanClassName ( string $className ) : string Clean a given class name from possibly prefixed backslash
completeRepositoryAssignments ( ) : void Complete repository-to-entity assignments.
convertParameterDataToArray ( array $parametersInformation ) : array Converts the internal, optimized data structure of parameter information into a human-friendly array with speaking indexes.
convertParameterReflectionToArray ( ParameterReflection $parameter, MethodReflection $method = null ) : array Converts the given parameter reflection into an information array
ensureAggregateRootInheritanceChainConsistency ( ) : void Checks whether all aggregate roots having superclasses have a repository assigned up to the tip of their hierarchy.
evaluateClassPropertyAnnotationsForSchema ( ClassSchema $classSchema, string $propertyName ) : boolean
expandType ( ClassReflection $class, string $type ) : string Expand shortened class names in "var" and "param" annotations, taking use statements into account.
filterArrayByClassesInNamespace ( array $array, string $packageNamespace ) : array Filter an array of entries were keys are class names by being in the given package namespace.
forgetChangedClasses ( ) : void Checks which classes lack a cache entry and removes their reflection data accordingly.
forgetClass ( string $className ) : void Forgets all reflection data related to the specified class
getDoctrinePhpParser ( ) : Doctrine\Common\Annotations\PhpParser Retrieves a singleton instance of the Doctrine PhpParser
getParentClasses ( ClassReflection $class, array $parentClasses = [] ) : array Finds all parent classes of the given class
getPrecompiledReflectionStoragePath ( ) : string Determines the path to the precompiled reflection data.
hasFrozenCacheInProduction ( ) : boolean
initialize ( ) : void Initialize the reflection service lazily
isTagIgnored ( string $tagName ) : boolean Check if a specific annotation tag is configured to be ignored.
loadClassReflectionCompiletimeCache ( ) : boolean Tries to load the reflection data from the compile time cache.
loadOrReflectClassIfNecessary ( string $className ) : void Loads reflection data from the cache or reflects the class if needed.
log ( string $message, integer $severity = LOG_INFO, mixed $additionalData = null ) : void Writes the given message along with the additional information into the log.
makeChildClassesAggregateRoot ( ClassSchema $classSchema ) : void Assigns the repository of any aggregate root to all it's subclasses, unless they are aggregate root already.
prepareClassReflectionForUsage ( string $className ) : string Initializes the ReflectionService, cleans the given class name and finally reflects the class if necessary.
produceCacheIdentifierFromClassName ( string $className ) : string Transform backslashes to underscores to provide an valid cache identifier.
reflectClass ( string $className ) : void Reflects the given class and stores the results in this service's properties.
reflectClassMethod ( string $className, MethodReflection $method ) : void
reflectClassMethodParameter ( string $className, MethodReflection $method, ParameterReflection $parameter ) : void
reflectEmergedClasses ( ) : void Checks if the given class names match those which already have been reflected. If the given array contains class names not yet known to this service, these classes will be reflected.
reflectPropertyTag ( string $className, PropertyReflection $property, string $tagName, array $tagValues ) : array
saveDevelopmentData ( ) Save reflection data to cache in Development context.
saveProductionData ( ) Save reflection data to cache in Production context.
updateReflectionData ( ) Set updated reflection data to caches.

Описание методов

addImplementedInterface() защищенный Метод

protected addImplementedInterface ( string $className, ClassReflection $interface )
$className string
$interface ClassReflection

addParentClass() защищенный Метод

protected addParentClass ( string $className, ClassReflection $parentClass ) : void
$className string
$parentClass ClassReflection
Результат void

addPropertiesToClassSchema() защищенный Метод

Properties will be added if they have a var annotation && (!transient-annotation && !inject-annotation) Invalid annotations will cause an exception to be thrown.
protected addPropertiesToClassSchema ( ClassSchema $classSchema ) : void
$classSchema ClassSchema
Результат void

buildClassSchema() защищенный Метод

Builds a class schema for the given class name.
protected buildClassSchema ( string $className ) : ClassSchema
$className string
Результат ClassSchema

buildClassSchemata() защищенный Метод

Builds class schemata from classes annotated as entities or value objects
protected buildClassSchemata ( array $classNames ) : void
$classNames array
Результат void

buildReflectionData() публичный Метод

This method is called by the CompiletimeObjectManager which also determines the list of classes to consider for reflection.
public buildReflectionData ( array $availableClassNames ) : void
$availableClassNames array List of all class names to consider for reflection
Результат void

checkValueObjectRequirements() защищенный Метод

does have a constructor and does not have any setter methods.
protected checkValueObjectRequirements ( string $className ) : void
$className string
Результат void

cleanClassName() защищенный Метод

Clean a given class name from possibly prefixed backslash
protected cleanClassName ( string $className ) : string
$className string
Результат string

completeRepositoryAssignments() защищенный Метод

This method looks for repositories that declare themselves responsible for a specific model and sets a repository classname on the corresponding models. It then walks the inheritance chain for all aggregate roots and checks the subclasses for their aggregate root status - if no repository is assigned yet, that will be done.
protected completeRepositoryAssignments ( ) : void
Результат void

convertParameterDataToArray() защищенный Метод

Converts the internal, optimized data structure of parameter information into a human-friendly array with speaking indexes.
protected convertParameterDataToArray ( array $parametersInformation ) : array
$parametersInformation array Raw, internal parameter information
Результат array Developer friendly version

convertParameterReflectionToArray() защищенный Метод

Converts the given parameter reflection into an information array
protected convertParameterReflectionToArray ( ParameterReflection $parameter, MethodReflection $method = null ) : array
$parameter ParameterReflection The parameter to reflect
$method MethodReflection The parameter's method
Результат array Parameter information array

ensureAggregateRootInheritanceChainConsistency() защищенный Метод

Checks whether all aggregate roots having superclasses have a repository assigned up to the tip of their hierarchy.
protected ensureAggregateRootInheritanceChainConsistency ( ) : void
Результат void

evaluateClassPropertyAnnotationsForSchema() защищенный Метод

protected evaluateClassPropertyAnnotationsForSchema ( ClassSchema $classSchema, string $propertyName ) : boolean
$classSchema ClassSchema
$propertyName string
Результат boolean

expandType() защищенный Метод

Expand shortened class names in "var" and "param" annotations, taking use statements into account.
protected expandType ( ClassReflection $class, string $type ) : string
$class ClassReflection
$type string the type inside var/param annotation
Результат string the possibly expanded type

filterArrayByClassesInNamespace() защищенный Метод

Filter an array of entries were keys are class names by being in the given package namespace.
protected filterArrayByClassesInNamespace ( array $array, string $packageNamespace ) : array
$array array
$packageNamespace string
Результат array

forgetChangedClasses() защищенный Метод

Checks which classes lack a cache entry and removes their reflection data accordingly.
protected forgetChangedClasses ( ) : void
Результат void

forgetClass() защищенный Метод

Forgets all reflection data related to the specified class
protected forgetClass ( string $className ) : void
$className string Name of the class to forget
Результат void

freezePackageReflection() публичный Метод

This method is used by the package manager.
public freezePackageReflection ( string $packageKey ) : void
$packageKey string
Результат void

getAllClassNames() публичный Метод

Returns the names of all classes known to this reflection service.
public getAllClassNames ( ) : array
Результат array Class names

getAllImplementationClassNamesForInterface() публичный Метод

Searches for and returns all class names of implementations of the given object type (interface name). If no class implementing the interface was found, an empty array is returned.
public getAllImplementationClassNamesForInterface ( string $interfaceName ) : array
$interfaceName string Name of the interface
Результат array An array of class names of the default implementation for the object type

getAllSubClassNamesForClass() публичный Метод

If no class inheriting the given class was found, an empty array is returned.
public getAllSubClassNamesForClass ( string $className ) : array
$className string Name of the parent class
Результат array An array of names of those classes being a direct or indirect subclass of the specified class

getClassAnnotation() публичный Метод

If multiple annotations are set on the target you will get one (random) instance of them.
public getClassAnnotation ( string $className, string $annotationClassName ) : object
$className string Name of the class
$annotationClassName string Annotation to filter for
Результат object

getClassAnnotations() публичный Метод

Returns the specified class annotations or an empty array
public getClassAnnotations ( string $className, string $annotationClassName = null ) : array
$className string Name of the class
$annotationClassName string Annotation to filter for
Результат array

getClassNameByObject() публичный Метод

Returns the class name of the given object. This is a convenience method that returns the expected class names even for proxy classes.
Устаревший: since 3.0 use \Neos\Utility\TypeHandling::getTypeForValue() instead
public getClassNameByObject ( object $object ) : string
$object object
Результат string The class name of the given object

getClassNamesByAnnotation() публичный Метод

Searches for and returns all names of classes which are tagged by the specified annotation. If no classes were found, an empty array is returned.
public getClassNamesByAnnotation ( string $annotationClassName ) : array
$annotationClassName string Name of the annotation class, for example "Neos\Flow\Annotations\Aspect"
Результат array

getClassPropertyNames() публичный Метод

Returns the names of all properties of the specified class
public getClassPropertyNames ( string $className ) : array
$className string Name of the class to return the property names of
Результат array An array of property names or an empty array if none exist

getClassSchema() публичный Метод

Returns the class schema for the given class
public getClassSchema ( mixed $classNameOrObject ) : ClassSchema
$classNameOrObject mixed The class name or an object
Результат ClassSchema

getClassesContainingMethodsAnnotatedWith() публичный Метод

Returns all class names of classes containing at least one method annotated with the given annotation class
public getClassesContainingMethodsAnnotatedWith ( string $annotationClassName ) : array
$annotationClassName string The annotation class name for a method annotation
Результат array An array of class names

getDefaultImplementationClassNameForInterface() публичный Метод

Searches for and returns the class name of the default implementation of the given interface name. If no class implementing the interface was found or more than one implementation was found in the package defining the interface, FALSE is returned.
public getDefaultImplementationClassNameForInterface ( string $interfaceName ) : mixed
$interfaceName string Name of the interface
Результат mixed Either the class name of the default implementation for the object type or FALSE

getDoctrinePhpParser() защищенный Метод

Retrieves a singleton instance of the Doctrine PhpParser
protected getDoctrinePhpParser ( ) : Doctrine\Common\Annotations\PhpParser
Результат Doctrine\Common\Annotations\PhpParser

getMethodAnnotation() публичный Метод

If multiple annotations are set on the target you will get one (random) instance of them.
public getMethodAnnotation ( string $className, string $methodName, string $annotationClassName ) : object
$className string Name of the class
$methodName string Name of the method
$annotationClassName string Annotation to filter for
Результат object

getMethodAnnotations() публичный Метод

Returns the specified method annotations or an empty array
public getMethodAnnotations ( string $className, string $methodName, string $annotationClassName = null ) : array
$className string Name of the class
$methodName string Name of the method
$annotationClassName string Annotation to filter for
Результат array

getMethodDeclaredReturnType() публичный Метод

Returns the declared return type of a method (for PHP < 7.0 this will always return null)
public getMethodDeclaredReturnType ( string $className, string $methodName ) : string
$className string
$methodName string
Результат string The declared return type of the method or null if none was declared

getMethodParameters() публичный Метод

Returns an array of parameters of the given method. Each entry contains additional information about the parameter position, type hint etc.
public getMethodParameters ( string $className, string $methodName ) : array
$className string Name of the class containing the method
$methodName string Name of the method to return parameter information of
Результат array An array of parameter names and additional information or an empty array of no parameters were found

getMethodTagsValues() публичный Метод

Returns all tags and their values the specified method is tagged with
public getMethodTagsValues ( string $className, string $methodName ) : array
$className string Name of the class containing the method
$methodName string Name of the method to return the tags and values of
Результат array An array of tags and their values or an empty array of no tags were found

getMethodsAnnotatedWith() публичный Метод

Returns all names of methods of the given class that are annotated with the given annotation class
public getMethodsAnnotatedWith ( string $className, string $annotationClassName ) : array
$className string Name of the class containing the method(s)
$annotationClassName string The annotation class name for a method annotation
Результат array An array of method names

getParentClasses() защищенный Метод

Finds all parent classes of the given class
protected getParentClasses ( ClassReflection $class, array $parentClasses = [] ) : array
$class ClassReflection The class to reflect
$parentClasses array Array of parent classes
Результат array

getPrecompiledReflectionStoragePath() защищенный Метод

Determines the path to the precompiled reflection data.
protected getPrecompiledReflectionStoragePath ( ) : string
Результат string

getPropertyAnnotation() публичный Метод

If multiple annotations are set on the target you will get one (random) instance of them.
public getPropertyAnnotation ( string $className, string $propertyName, string $annotationClassName ) : object
$className string Name of the class
$propertyName string Name of the property
$annotationClassName string Annotation to filter for
Результат object

getPropertyAnnotations() публичный Метод

Returns the specified property annotations or an empty array
public getPropertyAnnotations ( string $className, string $propertyName, string $annotationClassName = null ) : array
$className string Name of the class
$propertyName string Name of the property
$annotationClassName string Annotation to filter for
Результат array

getPropertyNamesByAnnotation() публичный Метод

Searches for and returns all names of class properties which are marked by the specified annotation. If no properties were found, an empty array is returned.
public getPropertyNamesByAnnotation ( string $className, string $annotationClassName ) : array
$className string Name of the class containing the properties
$annotationClassName string Class name of the annotation to search for
Результат array An array of property names carrying the annotation

getPropertyNamesByTag() публичный Метод

If no properties were found, an empty array is returned.
public getPropertyNamesByTag ( string $className, string $tag ) : array
$className string Name of the class containing the properties
$tag string Tag to search for
Результат array An array of property names tagged by the tag

getPropertyTagValues() публичный Метод

Returns the values of the specified class property tag
public getPropertyTagValues ( string $className, string $propertyName, string $tag ) : array
$className string Name of the class containing the property
$propertyName string Name of the tagged property
$tag string Tag to return the values of
Результат array An array of values or an empty array if the tag was not found

getPropertyTagsValues() публичный Метод

Returns all tags and their values the specified class property is tagged with
public getPropertyTagsValues ( string $className, string $propertyName ) : array
$className string Name of the class containing the property
$propertyName string Name of the property to return the tags and values of
Результат array An array of tags and their values or an empty array of no tags were found

hasFrozenCacheInProduction() защищенный Метод

protected hasFrozenCacheInProduction ( ) : boolean
Результат boolean

hasMethod() публичный Метод

Wrapper for method_exists() which tells if the given method exists.
public hasMethod ( string $className, string $methodName ) : boolean
$className string Name of the class containing the method
$methodName string Name of the method
Результат boolean

initialize() защищенный Метод

This method must be run only after all dependencies have been injected.
protected initialize ( ) : void
Результат void

injectClassLoader() публичный Метод

public injectClassLoader ( ClassLoader $classLoader ) : void
$classLoader Neos\Flow\Core\ClassLoader
Результат void

injectEnvironment() публичный Метод

public injectEnvironment ( Environment $environment ) : void
$environment Neos\Flow\Utility\Environment
Результат void

injectPackageManager() публичный Метод

public injectPackageManager ( Neos\Flow\Package\PackageManagerInterface $packageManager ) : void
$packageManager Neos\Flow\Package\PackageManagerInterface
Результат void

injectSettings() публичный Метод

public injectSettings ( array $settings ) : void
$settings array Settings of the Flow package
Результат void

injectSystemLogger() публичный Метод

public injectSystemLogger ( Neos\Flow\Log\SystemLoggerInterface $systemLogger ) : void
$systemLogger Neos\Flow\Log\SystemLoggerInterface
Результат void

isClassAbstract() публичный Метод

Tells if the specified class is abstract or not
public isClassAbstract ( string $className ) : boolean
$className string Name of the class to analyze
Результат boolean TRUE if the class is abstract, otherwise FALSE

isClassAnnotatedWith() публичный Метод

Tells if the specified class has the given annotation
public isClassAnnotatedWith ( string $className, string $annotationClassName ) : boolean
$className string Name of the class
$annotationClassName string Annotation to check for
Результат boolean

isClassFinal() публичный Метод

Tells if the specified class is final or not
public isClassFinal ( string $className ) : boolean
$className string Name of the class to analyze
Результат boolean TRUE if the class is final, otherwise FALSE

isClassImplementationOf() публичный Метод

Tells if the specified class implements the given interface
public isClassImplementationOf ( string $className, string $interfaceName ) : boolean
$className string Name of the class
$interfaceName string interface to check for
Результат boolean TRUE if the class implements $interfaceName, otherwise FALSE

isClassReflected() публичный Метод

Tells if the specified class is known to this reflection service and reflection information is available.
public isClassReflected ( string $className ) : boolean
$className string Name of the class
Результат boolean If the class is reflected by this service

isClassUnconfigurable() публичный Метод

Tells if the class is unconfigurable or not
public isClassUnconfigurable ( string $className ) : boolean
$className string Name of the class to analyze
Результат boolean return TRUE if class not could not be automatically configured, otherwise FALSE

isMethodAnnotatedWith() публичный Метод

Tells if the specified method has the given annotation
public isMethodAnnotatedWith ( string $className, string $methodName, string $annotationClassName ) : boolean
$className string Name of the class
$methodName string Name of the method
$annotationClassName string Annotation to check for
Результат boolean

isMethodFinal() публичный Метод

Tells if the specified method is final or not
public isMethodFinal ( string $className, string $methodName ) : boolean
$className string Name of the class containing the method
$methodName string Name of the method to analyze
Результат boolean TRUE if the method is final, otherwise FALSE

isMethodPrivate() публичный Метод

Tells if the specified method is private
public isMethodPrivate ( string $className, string $methodName ) : boolean
$className string Name of the class containing the method
$methodName string Name of the method to analyze
Результат boolean TRUE if the method is private, otherwise FALSE

isMethodProtected() публичный Метод

Tells if the specified method is protected
public isMethodProtected ( string $className, string $methodName ) : boolean
$className string Name of the class containing the method
$methodName string Name of the method to analyze
Результат boolean TRUE if the method is protected, otherwise FALSE

isMethodPublic() публичный Метод

Tells if the specified method is public
public isMethodPublic ( string $className, string $methodName ) : boolean
$className string Name of the class containing the method
$methodName string Name of the method to analyze
Результат boolean TRUE if the method is public, otherwise FALSE

isMethodStatic() публичный Метод

Tells if the specified method is declared as static or not
public isMethodStatic ( string $className, string $methodName ) : boolean
$className string Name of the class containing the method
$methodName string Name of the method to analyze
Результат boolean TRUE if the method is static, otherwise FALSE

isMethodTaggedWith() публичный Метод

Tells if the specified method is tagged with the given tag
public isMethodTaggedWith ( string $className, string $methodName, string $tag ) : boolean
$className string Name of the class containing the method
$methodName string Name of the method to analyze
$tag string Tag to check for
Результат boolean TRUE if the method is tagged with $tag, otherwise FALSE

isPropertyAnnotatedWith() публичный Метод

Tells if the specified property has the given annotation
public isPropertyAnnotatedWith ( string $className, string $propertyName, string $annotationClassName ) : boolean
$className string Name of the class
$propertyName string Name of the method
$annotationClassName string Annotation to check for
Результат boolean

isPropertyPrivate() публичный Метод

Tells if the specified property is private
public isPropertyPrivate ( string $className, string $propertyName ) : boolean
$className string Name of the class containing the method
$propertyName string Name of the property to analyze
Результат boolean TRUE if the property is private, otherwise FALSE

isPropertyTaggedWith() публичный Метод

Tells if the specified class property is tagged with the given tag
public isPropertyTaggedWith ( string $className, string $propertyName, string $tag ) : boolean
$className string Name of the class
$propertyName string Name of the property
$tag string Tag to check for
Результат boolean TRUE if the class property is tagged with $tag, otherwise FALSE

isTagIgnored() защищенный Метод

Check if a specific annotation tag is configured to be ignored.
protected isTagIgnored ( string $tagName ) : boolean
$tagName string The annotation tag to check
Результат boolean TRUE if the tag is configured to be ignored, FALSE otherwise

loadClassReflectionCompiletimeCache() защищенный Метод

The compile time cache is only supported for Development context and thus this function will return in any other context. If no reflection data was found, this method will at least load the precompiled reflection data of any possible frozen package. Even if precompiled reflection data could be loaded, FALSE will be returned in order to signal that other packages still need to be reflected.
protected loadClassReflectionCompiletimeCache ( ) : boolean
Результат boolean TRUE if reflection data could be loaded, otherwise FALSE

loadOrReflectClassIfNecessary() защищенный Метод

If the class is completely unknown, this method won't try to load or reflect it. If it is known and reflection data has been loaded already, it won't be loaded again. In Production context, with frozen caches, this method will load reflection data for the specified class from the runtime cache.
protected loadOrReflectClassIfNecessary ( string $className ) : void
$className string Name of the class to load data for
Результат void

log() защищенный Метод

Writes the given message along with the additional information into the log.
protected log ( string $message, integer $severity = LOG_INFO, mixed $additionalData = null ) : void
$message string The message to log
$severity integer An integer value, one of the LOG_* constants
$additionalData mixed A variable containing more information about the event to be logged
Результат void

makeChildClassesAggregateRoot() защищенный Метод

Assigns the repository of any aggregate root to all it's subclasses, unless they are aggregate root already.
protected makeChildClassesAggregateRoot ( ClassSchema $classSchema ) : void
$classSchema ClassSchema
Результат void

prepareClassReflectionForUsage() защищенный Метод

Initializes the ReflectionService, cleans the given class name and finally reflects the class if necessary.
protected prepareClassReflectionForUsage ( string $className ) : string
$className string
Результат string The cleaned class name

produceCacheIdentifierFromClassName() защищенный Метод

Transform backslashes to underscores to provide an valid cache identifier.
protected produceCacheIdentifierFromClassName ( string $className ) : string
$className string
Результат string

reflectClass() защищенный Метод

Reflects the given class and stores the results in this service's properties.
protected reflectClass ( string $className ) : void
$className string Full qualified name of the class to reflect
Результат void

reflectClassMethod() защищенный Метод

protected reflectClassMethod ( string $className, MethodReflection $method ) : void
$className string
$method MethodReflection
Результат void

reflectClassMethodParameter() защищенный Метод

protected reflectClassMethodParameter ( string $className, MethodReflection $method, ParameterReflection $parameter ) : void
$className string
$method MethodReflection
$parameter ParameterReflection
Результат void

reflectClassProperty() публичный Метод

public reflectClassProperty ( string $className, PropertyReflection $property ) : integer
$className string
$property PropertyReflection
Результат integer visibility

reflectEmergedClasses() защищенный Метод

Checks if the given class names match those which already have been reflected. If the given array contains class names not yet known to this service, these classes will be reflected.
protected reflectEmergedClasses ( ) : void
Результат void

reflectPropertyTag() защищенный Метод

protected reflectPropertyTag ( string $className, PropertyReflection $property, string $tagName, array $tagValues ) : array
$className string
$property PropertyReflection
$tagName string
$tagValues array
Результат array

saveDevelopmentData() защищенный Метод

Save reflection data to cache in Development context.
protected saveDevelopmentData ( )

saveProductionData() защищенный Метод

Save reflection data to cache in Production context.
protected saveProductionData ( )

saveToCache() публичный Метод

This method is triggered by a signal which is connected to the bootstrap's shutdown sequence. If the reflection data has previously been loaded from the runtime cache, saving it is omitted as changes are not expected. In Production context the whole cache is written at once and then frozen in order to be consistent. Frozen cache data in Development is only produced for classes contained in frozen packages.
public saveToCache ( ) : void
Результат void

setClassSchemataRuntimeCache() публичный Метод

Sets the dedicated class schema cache for runtime purposes
public setClassSchemataRuntimeCache ( Neos\Cache\Frontend\VariableFrontend $cache ) : void
$cache Neos\Cache\Frontend\VariableFrontend
Результат void

setReflectionDataCompiletimeCache() публичный Метод

Sets the compile-time data cache
public setReflectionDataCompiletimeCache ( Neos\Cache\Frontend\VariableFrontend $cache ) : void
$cache Neos\Cache\Frontend\VariableFrontend Cache for the reflection service
Результат void

setReflectionDataRuntimeCache() публичный Метод

Sets the runtime data cache
public setReflectionDataRuntimeCache ( Neos\Cache\Frontend\VariableFrontend $cache ) : void
$cache Neos\Cache\Frontend\VariableFrontend Cache for the reflection service
Результат void

setStatusCache() публичный Метод

The cache must be set before initializing the Reflection Service
public setStatusCache ( StringFrontend $cache ) : void
$cache Neos\Cache\Frontend\StringFrontend Cache for the reflection service
Результат void

unfreezePackageReflection() публичный Метод

This method is used by the package manager.
public unfreezePackageReflection ( string $packageKey ) : void
$packageKey string The package to remove the data from
Результат void

updateReflectionData() защищенный Метод

Set updated reflection data to caches.
protected updateReflectionData ( )

Описание свойств

$annotatedClasses защищенное свойство

Array of annotation classnames and the names of classes which are annotated with them
protected array $annotatedClasses
Результат array

$annotationReader защищенное свойство

protected Reader,Doctrine\Common\Annotations $annotationReader
Результат Doctrine\Common\Annotations\Reader

$availableClassNames защищенное свойство

protected array $availableClassNames
Результат array

$classLoader защищенное свойство

protected ClassLoader,Neos\Flow\Core $classLoader
Результат Neos\Flow\Core\ClassLoader

$classReflectionData защищенное свойство

Array with reflection information indexed by class name
protected array $classReflectionData
Результат array

$classSchemata защищенное свойство

Schemata of all classes which can be persisted
protected array<\Neos\Flow\Reflection\ClassSchema> $classSchemata
Результат array<\Neos\Flow\Reflection\ClassSchema>

$classSchemataRuntimeCache защищенное свойство

protected VariableFrontend,Neos\Cache\Frontend $classSchemataRuntimeCache
Результат Neos\Cache\Frontend\VariableFrontend

$classesByMethodAnnotations защищенное свойство

Array of method annotations and the classes and methods which are annotated with them
protected array $classesByMethodAnnotations
Результат array

$classesCurrentlyBeingForgotten защищенное свойство

An array of class names which are currently being forgotten by forgetClass(). Acts as a safeguard against infinite loops.
protected array $classesCurrentlyBeingForgotten
Результат array

$context защищенное свойство

protected ApplicationContext,Neos\Flow\Core $context
Результат Neos\Flow\Core\ApplicationContext

$doctrinePhpParser защищенное свойство

Note: Don't refer to this member directly but use getDoctrinePhpParser() to obtain an instance
protected PhpParser,Doctrine\Common\Annotations $doctrinePhpParser
Результат Doctrine\Common\Annotations\PhpParser

$environment защищенное свойство

protected Environment,Neos\Flow\Utility $environment
Результат Neos\Flow\Utility\Environment

$initialized защищенное свойство

protected bool $initialized
Результат boolean

$loadFromClassSchemaRuntimeCache защищенное свойство

In Production context, with frozen caches, this flag will be TRUE
protected bool $loadFromClassSchemaRuntimeCache
Результат boolean

$packageManager защищенное свойство

protected PackageManagerInterface,Neos\Flow\Package $packageManager
Результат Neos\Flow\Package\PackageManagerInterface

$reflectionDataCompiletimeCache защищенное свойство

protected VariableFrontend,Neos\Cache\Frontend $reflectionDataCompiletimeCache
Результат Neos\Cache\Frontend\VariableFrontend

$reflectionDataRuntimeCache защищенное свойство

protected VariableFrontend,Neos\Cache\Frontend $reflectionDataRuntimeCache
Результат Neos\Cache\Frontend\VariableFrontend

$settings защищенное свойство

protected array $settings
Результат array

$statusCache защищенное свойство

protected StringFrontend,Neos\Cache\Frontend $statusCache
Результат Neos\Cache\Frontend\StringFrontend

$systemLogger защищенное свойство

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
Результат Neos\Flow\Log\SystemLoggerInterface

$updatedReflectionData защищенное свойство

Array with updated reflection information (e.g. in Development context after classes have changed)
protected array $updatedReflectionData
Результат array

$useStatementsForClassCache защищенное свойство

a cache which stores the use statements reflected for a particular class (only relevant for un-expanded "var" and "param" annotations)
protected array $useStatementsForClassCache
Результат array