‪TYPO3CMS  10.4
TYPO3\CMS\Extbase\Reflection\ReflectionService Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Reflection\ReflectionService:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct (CacheManager $cacheManager=null)
 
 __destruct ()
 
ClassSchema getClassSchema ($classNameOrObject)
 
 __sleep ()
 
 __wakeup ()
 

Protected Member Functions

ClassSchema buildClassSchema ($className)
 

Protected Attributes

FrontendInterface $dataCache
 
bool $dataCacheNeedsUpdate = false
 
array $classSchemata = array( )
 

Private Attributes

bool $cachingEnabled = false
 

Static Private Attributes

static string $cacheEntryIdentifier
 

Detailed Description

Reflection service for acquiring reflection based information. Originally based on the TYPO3.Flow reflection service.

Definition at line 30 of file ReflectionService.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Reflection\ReflectionService::__construct ( CacheManager  $cacheManager = null)

If not $cacheManager is injected, the reflection service does not cache any data, useful for testing this service in unit tests.

Parameters
CacheManager$cacheManager

Definition at line 65 of file ReflectionService.php.

References TYPO3\CMS\Extbase\Reflection\ReflectionService\$classSchemata, and TYPO3\CMS\Core\Core\Environment\getProjectPath().

◆ __destruct()

TYPO3\CMS\Extbase\Reflection\ReflectionService::__destruct ( )

Definition at line 84 of file ReflectionService.php.

Member Function Documentation

◆ __sleep()

TYPO3\CMS\Extbase\Reflection\ReflectionService::__sleep ( )

Definition at line 130 of file ReflectionService.php.

◆ __wakeup()

TYPO3\CMS\Extbase\Reflection\ReflectionService::__wakeup ( )

Definition at line 138 of file ReflectionService.php.

◆ buildClassSchema()

ClassSchema TYPO3\CMS\Extbase\Reflection\ReflectionService::buildClassSchema (   $className)
protected

Builds class schemata from classes annotated as entities or value objects

Parameters
string$className
Exceptions
Exception

Definition at line 115 of file ReflectionService.php.

Referenced by TYPO3\CMS\Extbase\Reflection\ReflectionService\getClassSchema().

◆ getClassSchema()

ClassSchema TYPO3\CMS\Extbase\Reflection\ReflectionService::getClassSchema (   $classNameOrObject)

Returns the class schema for the given class

Parameters
mixed$classNameOrObject‪The class name or an object
Returns
ClassSchema
Exceptions

Definition at line 98 of file ReflectionService.php.

References TYPO3\CMS\Extbase\Reflection\ReflectionService\buildClassSchema().

Referenced by TYPO3\CMS\Extbase\Object\Container\Container\getEmptyObject(), and TYPO3\CMS\Extbase\Object\Container\Container\getInstanceInternal().

Member Data Documentation

◆ $cacheEntryIdentifier

string TYPO3\CMS\Extbase\Reflection\ReflectionService::$cacheEntryIdentifier
staticprivate

Definition at line 34 of file ReflectionService.php.

◆ $cachingEnabled

bool TYPO3\CMS\Extbase\Reflection\ReflectionService::$cachingEnabled = false
private

Definition at line 57 of file ReflectionService.php.

◆ $classSchemata

array TYPO3\CMS\Extbase\Reflection\ReflectionService::$classSchemata = array( )
protected

Local cache for Class schemata

Definition at line 53 of file ReflectionService.php.

Referenced by TYPO3\CMS\Extbase\Reflection\ReflectionService\__construct().

◆ $dataCache

FrontendInterface TYPO3\CMS\Extbase\Reflection\ReflectionService::$dataCache
protected

Definition at line 38 of file ReflectionService.php.

◆ $dataCacheNeedsUpdate

bool TYPO3\CMS\Extbase\Reflection\ReflectionService::$dataCacheNeedsUpdate = false
protected

Indicates whether the Reflection cache needs to be updated.

This flag needs to be set as soon as new Reflection information was created.

Definition at line 47 of file ReflectionService.php.