TYPO3 API  SVNRelease
Public Member Functions | Protected Member Functions | Protected Attributes
Tx_Extbase_Reflection_Service Class Reference
Inheritance diagram for Tx_Extbase_Reflection_Service:
Inheritance graph
[legend]
Collaboration diagram for Tx_Extbase_Reflection_Service:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 injectConfigurationManager (Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager)
 setDataCache (t3lib_cache_frontend_VariableFrontend $dataCache)
 initialize ()
 isInitialized ()
 shutdown ()
 getClassPropertyNames ($className)
 getClassSchema ($classNameOrObject)
 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 (ReflectionParameter $parameter, $parameterPosition, ReflectionMethod $method=NULL)
 getMethodReflection ($className, $methodName)
 loadFromCache ()
 saveToCache ()

Protected Attributes

 $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

Detailed Description

Definition at line 34 of file Service.php.


Member Function Documentation

Tx_Extbase_Reflection_Service::buildClassSchema ( className) [protected]

Builds class schemata from classes annotated as entities or value objects

Returns:
Tx_Extbase_Reflection_ClassSchema The class schema

Definition at line 393 of file Service.php.

References getClassPropertyNames(), getPropertyTagValues(), isPropertyTaggedWith(), Tx_Extbase_Reflection_ClassSchema\MODELTYPE_ENTITY, and Tx_Extbase_Reflection_ClassSchema\MODELTYPE_VALUEOBJECT.

Referenced by getClassSchema().

Tx_Extbase_Reflection_Service::convertParameterReflectionToArray ( ReflectionParameter $  parameter,
parameterPosition,
ReflectionMethod $  method = NULL 
) [protected]

Converts the given parameter reflection into an information array

Parameters:
ReflectionParameter$parameterThe parameter to reflect
Returns:
array Parameter information array

Definition at line 434 of file Service.php.

References getMethodTagsValues().

Referenced by getMethodParameters(), and reflectClass().

Tx_Extbase_Reflection_Service::getClassPropertyNames ( className)

Returns the names of all properties of the specified class

Parameters:
string$classNameName of the class to return the property names of
Returns:
array An array of property names or an empty array if none exist

Definition at line 206 of file Service.php.

References reflectClass().

Referenced by buildClassSchema().

Tx_Extbase_Reflection_Service::getClassSchema ( classNameOrObject)

Returns the class schema for the given class

Parameters:
mixed$classNameOrObjectThe class name or an object
Returns:
Tx_Extbase_Reflection_ClassSchema
Author:
Karsten Dambekalns <karsten@typo3.org>

Definition at line 218 of file Service.php.

References buildClassSchema().

Tx_Extbase_Reflection_Service::getMethodParameters ( className,
methodName 
)

Returns an array of parameters of the given method. Each entry contains additional information about the parameter position, type hint etc.

Parameters:
string$classNameName of the class containing the method
string$methodNameName of the method to return parameter information of
Returns:
array An array of parameter names and additional information or an empty array of no parameters were found

Definition at line 257 of file Service.php.

References convertParameterReflectionToArray(), and getMethodReflection().

Tx_Extbase_Reflection_Service::getMethodReflection ( className,
methodName 
) [protected]

Returns the Reflection of a method.

Parameters:
string$classNameName of the class containing the method
string$methodNameName of the method to return the Reflection for
Returns:
Tx_Extbase_Reflection_MethodReflection the method Reflection object

Definition at line 472 of file Service.php.

Referenced by getMethodParameters(), and getMethodTagsValues().

Tx_Extbase_Reflection_Service::getMethodTagsValues ( className,
methodName 
)

Returns all tags and their values the specified method is tagged with

Parameters:
string$classNameName of the class containing the method
string$methodNameName of the method to return the tags and values of
Returns:
array An array of tags and their values or an empty array of no tags were found

Definition at line 235 of file Service.php.

References getMethodReflection().

Referenced by convertParameterReflectionToArray().

Tx_Extbase_Reflection_Service::getPropertyTagsValues ( className,
propertyName 
)

Returns all tags and their values the specified class property is tagged with

Parameters:
string$classNameName of the class containing the property
string$propertyNameName of the property to return the tags and values of
Returns:
array An array of tags and their values or an empty array of no tags were found

Definition at line 275 of file Service.php.

References reflectClass().

Tx_Extbase_Reflection_Service::getPropertyTagValues ( className,
propertyName,
tag 
)

Returns the values of the specified class property tag

Parameters:
string$classNameName of the class containing the property
string$propertyNameName of the tagged property
string$tagTag to return the values of
Returns:
array An array of values or an empty array if the tag was not found
Author:
Robert Lemke <robert@typo3.org>

Definition at line 291 of file Service.php.

References reflectClass().

Referenced by buildClassSchema().

Tx_Extbase_Reflection_Service::initialize ( )

Initializes this service

Returns:
void

Definition at line 167 of file Service.php.

References Tx_Extbase_Configuration_ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK, and loadFromCache().

Tx_Extbase_Reflection_Service::injectConfigurationManager ( Tx_Extbase_Configuration_ConfigurationManagerInterface configurationManager)
Parameters:
Tx_Extbase_Configuration_ConfigurationManagerInterface$configurationManager
Returns:
void

Definition at line 146 of file Service.php.

References $configurationManager.

Tx_Extbase_Reflection_Service::isClassReflected ( className)

Tells if the specified class is known to this reflection service and reflection information is available.

Parameters:
string$classNameName of the class
Returns:
boolean If the class is reflected by this service
Author:
Robert Lemke <robert@typo3.org>

Definition at line 306 of file Service.php.

Tx_Extbase_Reflection_Service::isClassTaggedWith ( className,
tag 
)

Tells if the specified class is tagged with the given tag

Parameters:
string$classNameName of the class
string$tagTag to check for
Returns:
boolean TRUE if the class is tagged with $tag, otherwise FALSE
Author:
Robert Lemke <robert@typo3.org>

Definition at line 319 of file Service.php.

References reflectClass().

Tx_Extbase_Reflection_Service::isInitialized ( )

Returns whether the Reflection Service is initialized.

Returns:
boolean true if the Reflection Service is initialized, otherwise false

Definition at line 184 of file Service.php.

Tx_Extbase_Reflection_Service::isPropertyTaggedWith ( className,
propertyName,
tag 
)

Tells if the specified class property is tagged with the given tag

Parameters:
string$classNameName of the class
string$propertyNameName of the property
string$tagTag to check for
Returns:
boolean TRUE if the class property is tagged with $tag, otherwise FALSE
Author:
Robert Lemke <robert@typo3.org>

Definition at line 336 of file Service.php.

References reflectClass().

Referenced by buildClassSchema().

Tx_Extbase_Reflection_Service::loadFromCache ( ) [protected]

Tries to load the reflection data from this service's cache.

Returns:
void

Definition at line 485 of file Service.php.

Referenced by initialize().

Tx_Extbase_Reflection_Service::reflectClass ( className) [protected]

Reflects the given class and stores the results in this service's properties.

Parameters:
string$classNameFull qualified name of the class to reflect
Returns:
void

Definition at line 349 of file Service.php.

References convertParameterReflectionToArray().

Referenced by getClassPropertyNames(), getPropertyTagsValues(), getPropertyTagValues(), isClassTaggedWith(), and isPropertyTaggedWith().

Tx_Extbase_Reflection_Service::saveToCache ( ) [protected]

Exports the internal reflection data into the ReflectionData cache.

Returns:
void

Definition at line 499 of file Service.php.

Referenced by shutdown().

Tx_Extbase_Reflection_Service::setDataCache ( t3lib_cache_frontend_VariableFrontend dataCache)

Sets the data cache.

The cache must be set before initializing the Reflection Service.

Parameters:
t3lib_cache_frontend_VariableFrontend$dataCacheCache for the Reflection service
Returns:
void

Definition at line 158 of file Service.php.

References $dataCache.

Tx_Extbase_Reflection_Service::shutdown ( )

Shuts the Reflection Service down.

Returns:
void

Definition at line 193 of file Service.php.

References saveToCache().


Member Data Documentation

Tx_Extbase_Reflection_Service::$cacheIdentifier [protected]

Definition at line 140 of file Service.php.

Tx_Extbase_Reflection_Service::$classPropertyNames = array() [protected]

Definition at line 97 of file Service.php.

Tx_Extbase_Reflection_Service::$classSchemata = array() [protected]

Definition at line 130 of file Service.php.

Tx_Extbase_Reflection_Service::$classTagsValues = array() [protected]

Definition at line 75 of file Service.php.

Tx_Extbase_Reflection_Service::$configurationManager [protected]

Definition at line 135 of file Service.php.

Referenced by injectConfigurationManager().

Tx_Extbase_Reflection_Service::$dataCache [protected]

Definition at line 46 of file Service.php.

Referenced by setDataCache().

Tx_Extbase_Reflection_Service::$dataCacheNeedsUpdate = FALSE [protected]

Definition at line 124 of file Service.php.

Tx_Extbase_Reflection_Service::$detectClassChanges = FALSE [protected]

Definition at line 53 of file Service.php.

Tx_Extbase_Reflection_Service::$ignoredTags = array('package', 'subpackage', 'license', 'copyright', 'author', 'version', 'const') [protected]

Definition at line 111 of file Service.php.

Tx_Extbase_Reflection_Service::$initialized = FALSE [protected]

Definition at line 41 of file Service.php.

Tx_Extbase_Reflection_Service::$methodParameters = array() [protected]

Definition at line 90 of file Service.php.

Tx_Extbase_Reflection_Service::$methodTagsValues = array() [protected]

Definition at line 82 of file Service.php.

Tx_Extbase_Reflection_Service::$propertyTagsValues = array() [protected]

Definition at line 104 of file Service.php.

Tx_Extbase_Reflection_Service::$reflectedClassNames = array() [protected]

Definition at line 61 of file Service.php.

Tx_Extbase_Reflection_Service::$taggedClasses = array() [protected]

Definition at line 68 of file Service.php.


The documentation for this class was generated from the following file: