TYPO3
7.6
|
Public Member Functions | |
injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) | |
injectConfigurationManager (\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) | |
setDataCache (\TYPO3\CMS\Core\Cache\Frontend\VariableFrontend $dataCache) | |
initialize () | |
isInitialized () | |
shutdown () | |
getClassTagsValues ($className) | |
getClassTagValues ($className, $tag) | |
getClassPropertyNames ($className) | |
getClassSchema ($classNameOrObject) | |
hasMethod ($className, $methodName) | |
getMethodTagsValues ($className, $methodName) | |
getMethodParameters ($className, $methodName) | |
getPropertyTagsValues ($className, $propertyName) | |
getPropertyTagValues ($className, $propertyName, $tag) | |
isClassReflected ($className) | |
isClassTaggedWith ($className, $tag) | |
isPropertyTaggedWith ($className, $propertyName, $tag) | |
Protected Member Functions | |
reflectClass ($className) | |
buildClassSchema ($className) | |
convertParameterReflectionToArray (ParameterReflection $parameter, $parameterPosition, MethodReflection $method=null) | |
getMethodReflection ($className, $methodName) | |
loadFromCache () | |
saveToCache () | |
Protected Attributes | |
$objectManager | |
$initialized = false | |
$dataCache | |
$detectClassChanges = false | |
$reflectedClassNames = array() | |
$taggedClasses = array() | |
$classTagsValues = array() | |
$methodTagsValues = array() | |
$methodParameters = array() | |
$classPropertyNames = array() | |
$propertyTagsValues = array() | |
$ignoredTags = array('package', 'subpackage', 'license', 'copyright', 'author', 'version', 'const') | |
$dataCacheNeedsUpdate = false | |
$classSchemata = array() | |
$configurationManager | |
$cacheIdentifier | |
$methodReflections = array() | |
A backport of the TYPO3.Flow reflection service for aquiring reflection based information. Most of the code is based on the TYPO3.Flow reflection service.
Definition at line 26 of file ReflectionService.php.
|
protected |
Builds class schemata from classes annotated as entities or value objects
string | $className |
Exception\UnknownClassException |
Definition at line 479 of file ReflectionService.php.
References elseif, ReflectionService\getClassPropertyNames(), ReflectionService\getPropertyTagValues(), ReflectionService\isPropertyTaggedWith(), ClassSchema\MODELTYPE_ENTITY, ClassSchema\MODELTYPE_VALUEOBJECT, and ClassNamingUtility\translateModelNameToRepositoryName().
Referenced by ReflectionService\getClassSchema().
|
protected |
Converts the given parameter reflection into an information array
ParameterReflection | $parameter | The parameter to reflect |
int | $parameterPosition | |
MethodReflection | NULL | $method |
Definition at line 519 of file ReflectionService.php.
References elseif, ParameterReflection\getClass(), ReflectionService\getMethodTagsValues(), TypeHandlingUtility\isSimpleType(), and TypeHandlingUtility\parseType().
Referenced by ReflectionService\getMethodParameters(), and ReflectionService\reflectClass().
getClassPropertyNames | ( | $className | ) |
Returns the names of all properties of the specified class
string | $className | Name of the class to return the property names of |
Definition at line 254 of file ReflectionService.php.
References ReflectionService\reflectClass().
Referenced by ReflectionService\buildClassSchema().
getClassSchema | ( | $classNameOrObject | ) |
Returns the class schema for the given class
mixed | $classNameOrObject | The class name or an object |
Definition at line 268 of file ReflectionService.php.
References ReflectionService\buildClassSchema().
getClassTagsValues | ( | $className | ) |
Returns all tags and their values the specified class is tagged with
string | $className | Name of the class |
Definition at line 219 of file ReflectionService.php.
References ReflectionService\reflectClass().
getClassTagValues | ( | $className, | |
$tag | |||
) |
Returns the values of the specified class tag
string | $className | Name of the class containing the property |
string | $tag | Tag to return the values of |
Definition at line 237 of file ReflectionService.php.
References ReflectionService\reflectClass().
getMethodParameters | ( | $className, | |
$methodName | |||
) |
Returns an array of parameters of the given method. Each entry contains additional information about the parameter position, type hint etc.
string | $className | Name of the class containing the method |
string | $methodName | Name of the method to return parameter information of |
Definition at line 328 of file ReflectionService.php.
References ReflectionService\convertParameterReflectionToArray(), and ReflectionService\getMethodReflection().
|
protected |
Returns the Reflection of a method.
string | $className | Name of the class containing the method |
string | $methodName | Name of the method to return the Reflection for |
Definition at line 564 of file ReflectionService.php.
Referenced by ReflectionService\getMethodParameters(), and ReflectionService\getMethodTagsValues().
getMethodTagsValues | ( | $className, | |
$methodName | |||
) |
Returns all tags and their values the specified method is tagged with
string | $className | Name of the class containing the method |
string | $methodName | Name of the method to return the tags and values of |
Definition at line 306 of file ReflectionService.php.
References ReflectionService\getMethodReflection().
Referenced by ReflectionService\convertParameterReflectionToArray().
getPropertyTagsValues | ( | $className, | |
$propertyName | |||
) |
Returns all tags and their values the specified class property is tagged with
string | $className | Name of the class containing the property |
string | $propertyName | Name of the property to return the tags and values of |
Definition at line 347 of file ReflectionService.php.
References ReflectionService\reflectClass().
getPropertyTagValues | ( | $className, | |
$propertyName, | |||
$tag | |||
) |
Returns the values of the specified class property tag
string | $className | Name of the class containing the property |
string | $propertyName | Name of the tagged property |
string | $tag | Tag to return the values of |
Definition at line 366 of file ReflectionService.php.
References ReflectionService\reflectClass().
Referenced by ReflectionService\buildClassSchema().
hasMethod | ( | $className, | |
$methodName | |||
) |
Wrapper for method_exists() which tells if the given method exists.
string | $className | Name of the class containing the method |
string | $methodName | Name of the method |
Definition at line 285 of file ReflectionService.php.
initialize | ( | ) |
Initializes this service
Exception |
Definition at line 179 of file ReflectionService.php.
References ReflectionService\loadFromCache().
injectConfigurationManager | ( | \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface | $configurationManager | ) |
\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface | $configurationManager |
Definition at line 155 of file ReflectionService.php.
References ReflectionService\$configurationManager.
injectObjectManager | ( | \TYPO3\CMS\Extbase\Object\ObjectManagerInterface | $objectManager | ) |
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface | $objectManager |
Definition at line 147 of file ReflectionService.php.
References ReflectionService\$objectManager.
isClassReflected | ( | $className | ) |
Tells if the specified class is known to this reflection service and reflection information is available.
string | $className | Name of the class |
Definition at line 384 of file ReflectionService.php.
isClassTaggedWith | ( | $className, | |
$tag | |||
) |
Tells if the specified class is tagged with the given tag
string | $className | Name of the class |
string | $tag | Tag to check for |
Definition at line 396 of file ReflectionService.php.
References ReflectionService\reflectClass().
isInitialized | ( | ) |
Returns whether the Reflection Service is initialized.
Definition at line 195 of file ReflectionService.php.
References ReflectionService\$initialized.
isPropertyTaggedWith | ( | $className, | |
$propertyName, | |||
$tag | |||
) |
Tells if the specified class property is tagged with the given tag
string | $className | Name of the class |
string | $propertyName | Name of the property |
string | $tag | Tag to check for |
Definition at line 418 of file ReflectionService.php.
References ReflectionService\reflectClass().
Referenced by ReflectionService\buildClassSchema().
|
protected |
Tries to load the reflection data from this service's cache.
Definition at line 578 of file ReflectionService.php.
Referenced by ReflectionService\initialize().
|
protected |
Reflects the given class and stores the results in this service's properties.
string | $className | Full qualified name of the class to reflect |
Definition at line 438 of file ReflectionService.php.
References ReflectionService\convertParameterReflectionToArray().
Referenced by ReflectionService\getClassPropertyNames(), ReflectionService\getClassTagsValues(), ReflectionService\getClassTagValues(), ReflectionService\getPropertyTagsValues(), ReflectionService\getPropertyTagValues(), ReflectionService\isClassTaggedWith(), and ReflectionService\isPropertyTaggedWith().
|
protected |
Exports the internal reflection data into the ReflectionData cache.
Exception |
Definition at line 594 of file ReflectionService.php.
Referenced by ReflectionService\shutdown().
setDataCache | ( | \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend | $dataCache | ) |
Sets the data cache.
The cache must be set before initializing the Reflection Service.
\TYPO3\CMS\Core\Cache\Frontend\VariableFrontend | $dataCache | Cache for the Reflection service |
Definition at line 168 of file ReflectionService.php.
References ReflectionService\$dataCache.
shutdown | ( | ) |
Shuts the Reflection Service down.
Definition at line 205 of file ReflectionService.php.
References ReflectionService\saveToCache().
|
protected |
Definition at line 137 of file ReflectionService.php.
|
protected |
Definition at line 94 of file ReflectionService.php.
|
protected |
Definition at line 127 of file ReflectionService.php.
|
protected |
Definition at line 72 of file ReflectionService.php.
|
protected |
Definition at line 132 of file ReflectionService.php.
Referenced by ReflectionService\injectConfigurationManager().
|
protected |
Definition at line 43 of file ReflectionService.php.
Referenced by ReflectionService\setDataCache().
|
protected |
Definition at line 120 of file ReflectionService.php.
|
protected |
Definition at line 50 of file ReflectionService.php.
|
protected |
Definition at line 108 of file ReflectionService.php.
|
protected |
Definition at line 38 of file ReflectionService.php.
Referenced by ReflectionService\isInitialized().
|
protected |
Definition at line 87 of file ReflectionService.php.
|
protected |
Definition at line 142 of file ReflectionService.php.
|
protected |
Definition at line 79 of file ReflectionService.php.
|
protected |
Definition at line 31 of file ReflectionService.php.
Referenced by ReflectionService\injectObjectManager().
|
protected |
Definition at line 101 of file ReflectionService.php.
|
protected |
Definition at line 58 of file ReflectionService.php.
|
protected |
Definition at line 65 of file ReflectionService.php.