‪TYPO3CMS  10.4
TYPO3\CMS\Extbase\Reflection\ClassSchema Class Reference

Public Member Functions

 __construct (string $className)
 
string getClassName ()
 
Property getProperty (string $propertyName)
 
array Property[] getProperties ()
 
bool isAggregateRoot ()
 
bool hasProperty (string $propertyName)
 
bool hasConstructor ()
 
Method getMethod (string $methodName)
 
array Method[] getMethods ()
 
bool isModel ()
 
bool isEntity ()
 
bool isValueObject ()
 
bool isSingleton ()
 
bool hasMethod (string $methodName)
 
bool hasInjectProperties ()
 
bool hasInjectMethods ()
 
array Method[] getInjectMethods ()
 
array Property[] getInjectProperties ()
 

Protected Member Functions

 reflectProperties (\ReflectionClass $reflectionClass)
 
 reflectMethods (\ReflectionClass $reflectionClass)
 
bool hasInjectMethodName (\ReflectionMethod $reflectionMethod)
 

Protected Attributes

string $className
 
array $properties = array( )
 

Private Member Functions

array Property[] buildPropertyObjects ()
 
array Method[] buildMethodObjects ()
 

Private Attributes

const BIT_CLASS_IS_ENTITY = 1 << 0
 
const BIT_CLASS_IS_VALUE_OBJECT = 1 << 1
 
const BIT_CLASS_IS_AGGREGATE_ROOT = 1 << 2
 
const BIT_CLASS_IS_CONTROLLER = 1 << 3
 
const BIT_CLASS_IS_SINGLETON = 1 << 4
 
const BIT_CLASS_HAS_CONSTRUCTOR = 1 << 5
 
const BIT_CLASS_HAS_INJECT_METHODS = 1 << 6
 
const BIT_CLASS_HAS_INJECT_PROPERTIES = 1 << 7
 
BitSet $bitSet
 
array $methods = array( )
 
array $injectMethods = array( )
 

Static Private Attributes

static array $propertyObjects = array( )
 
static array $methodObjects = array( )
 
static PropertyInfoExtractor $propertyInfoExtractor
 
static DocBlockFactory $docBlockFactory
 

Detailed Description

A class schema

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 54 of file ClassSchema.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Reflection\ClassSchema::__construct ( string  $className)

Constructs this class schema

Parameters
string$className‪Name of the class this schema is referring to
Exceptions
InvalidTypeHintException
InvalidValidationConfigurationException

Definition at line 113 of file ClassSchema.php.

References TYPO3\CMS\Extbase\Reflection\ClassSchema\$className, TYPO3\CMS\Extbase\Reflection\ClassSchema\$docBlockFactory, TYPO3\CMS\Extbase\Reflection\ClassSchema\reflectMethods(), TYPO3\CMS\Extbase\Reflection\ClassSchema\reflectProperties(), and TYPO3\CMS\Core\Utility\ClassNamingUtility\translateModelNameToRepositoryName().

Member Function Documentation

◆ buildMethodObjects()

array Method [] TYPO3\CMS\Extbase\Reflection\ClassSchema::buildMethodObjects ( )
private

◆ buildPropertyObjects()

array Property [] TYPO3\CMS\Extbase\Reflection\ClassSchema::buildPropertyObjects ( )
private

◆ getClassName()

string TYPO3\CMS\Extbase\Reflection\ClassSchema::getClassName ( )

◆ getInjectMethods()

array Method [] TYPO3\CMS\Extbase\Reflection\ClassSchema::getInjectMethods ( )

◆ getInjectProperties()

array Property [] TYPO3\CMS\Extbase\Reflection\ClassSchema::getInjectProperties ( )

◆ getMethod()

◆ getMethods()

array Method [] TYPO3\CMS\Extbase\Reflection\ClassSchema::getMethods ( )
Returns
‪array|Method[]

Definition at line 555 of file ClassSchema.php.

References TYPO3\CMS\Extbase\Reflection\ClassSchema\buildMethodObjects().

◆ getProperties()

array Property [] TYPO3\CMS\Extbase\Reflection\ClassSchema::getProperties ( )
Returns
‪array|Property[]

Definition at line 500 of file ClassSchema.php.

References TYPO3\CMS\Extbase\Reflection\ClassSchema\buildPropertyObjects().

◆ getProperty()

◆ hasConstructor()

bool TYPO3\CMS\Extbase\Reflection\ClassSchema::hasConstructor ( )
Returns
‪bool

Definition at line 530 of file ClassSchema.php.

Referenced by TYPO3\CMS\Extbase\Object\Container\Container\getConstructorArguments().

◆ hasInjectMethodName()

bool TYPO3\CMS\Extbase\Reflection\ClassSchema::hasInjectMethodName ( \ReflectionMethod  $reflectionMethod)
protected
Parameters
\ReflectionMethod$reflectionMethod
Returns
‪bool

Definition at line 564 of file ClassSchema.php.

Referenced by TYPO3\CMS\Extbase\Reflection\ClassSchema\reflectMethods().

◆ hasInjectMethods()

bool TYPO3\CMS\Extbase\Reflection\ClassSchema::hasInjectMethods ( )
Returns
‪bool

Definition at line 635 of file ClassSchema.php.

Referenced by TYPO3\CMS\Extbase\Object\Container\Container\injectDependencies().

◆ hasInjectProperties()

bool TYPO3\CMS\Extbase\Reflection\ClassSchema::hasInjectProperties ( )
Returns
‪bool

Definition at line 627 of file ClassSchema.php.

Referenced by TYPO3\CMS\Extbase\Object\Container\Container\injectDependencies().

◆ hasMethod()

bool TYPO3\CMS\Extbase\Reflection\ClassSchema::hasMethod ( string  $methodName)
Parameters
string$methodName
Returns
‪bool

Definition at line 619 of file ClassSchema.php.

◆ hasProperty()

bool TYPO3\CMS\Extbase\Reflection\ClassSchema::hasProperty ( string  $propertyName)

If the class schema has a certain property.

Parameters
string$propertyName‪Name of the property
Returns
‪bool

Definition at line 522 of file ClassSchema.php.

◆ isAggregateRoot()

bool TYPO3\CMS\Extbase\Reflection\ClassSchema::isAggregateRoot ( )

Whether the class is an aggregate root and therefore accessible through a repository.

Returns
‪bool TRUE if it is managed

Definition at line 511 of file ClassSchema.php.

◆ isEntity()

bool TYPO3\CMS\Extbase\Reflection\ClassSchema::isEntity ( )
Returns
‪bool

Definition at line 593 of file ClassSchema.php.

Referenced by TYPO3\CMS\Extbase\Reflection\ClassSchema\isModel().

◆ isModel()

bool TYPO3\CMS\Extbase\Reflection\ClassSchema::isModel ( )

◆ isSingleton()

◆ isValueObject()

bool TYPO3\CMS\Extbase\Reflection\ClassSchema::isValueObject ( )
Returns
‪bool

Definition at line 602 of file ClassSchema.php.

Referenced by TYPO3\CMS\Extbase\Reflection\ClassSchema\isModel().

◆ reflectMethods()

TYPO3\CMS\Extbase\Reflection\ClassSchema::reflectMethods ( \ReflectionClass  $reflectionClass)
protected
Parameters
\ReflectionClass$reflectionClass
Exceptions
InvalidTypeHintException
InvalidValidationConfigurationException

Definition at line 289 of file ClassSchema.php.

References TYPO3\CMS\Core\Utility\StringUtility\endsWith(), TYPO3\CMS\Extbase\Reflection\ClassSchema\hasInjectMethodName(), and TYPO3\CMS\Extbase\Validation\ValidatorClassNameResolver\resolve().

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

◆ reflectProperties()

Member Data Documentation

◆ $bitSet

BitSet TYPO3\CMS\Extbase\Reflection\ClassSchema::$bitSet
private

Definition at line 67 of file ClassSchema.php.

◆ $className

◆ $docBlockFactory

DocBlockFactory TYPO3\CMS\Extbase\Reflection\ClassSchema::$docBlockFactory
staticprivate

◆ $injectMethods

array TYPO3\CMS\Extbase\Reflection\ClassSchema::$injectMethods = array( )
private

◆ $methodObjects

array TYPO3\CMS\Extbase\Reflection\ClassSchema::$methodObjects = array( )
staticprivate

Definition at line 75 of file ClassSchema.php.

◆ $methods

array TYPO3\CMS\Extbase\Reflection\ClassSchema::$methods = array( )
private

Definition at line 91 of file ClassSchema.php.

Referenced by TYPO3\CMS\Extbase\Reflection\ClassSchema\getMethod().

◆ $properties

array TYPO3\CMS\Extbase\Reflection\ClassSchema::$properties = array( )
protected

Properties of the class which need to be persisted

Definition at line 87 of file ClassSchema.php.

Referenced by TYPO3\CMS\Extbase\Reflection\ClassSchema\getProperty().

◆ $propertyInfoExtractor

PropertyInfoExtractor TYPO3\CMS\Extbase\Reflection\ClassSchema::$propertyInfoExtractor
staticprivate

Definition at line 99 of file ClassSchema.php.

◆ $propertyObjects

array TYPO3\CMS\Extbase\Reflection\ClassSchema::$propertyObjects = array( )
staticprivate

Definition at line 71 of file ClassSchema.php.

◆ BIT_CLASS_HAS_CONSTRUCTOR

const TYPO3\CMS\Extbase\Reflection\ClassSchema::BIT_CLASS_HAS_CONSTRUCTOR = 1 << 5
private

Definition at line 61 of file ClassSchema.php.

◆ BIT_CLASS_HAS_INJECT_METHODS

const TYPO3\CMS\Extbase\Reflection\ClassSchema::BIT_CLASS_HAS_INJECT_METHODS = 1 << 6
private

Definition at line 62 of file ClassSchema.php.

◆ BIT_CLASS_HAS_INJECT_PROPERTIES

const TYPO3\CMS\Extbase\Reflection\ClassSchema::BIT_CLASS_HAS_INJECT_PROPERTIES = 1 << 7
private

Definition at line 63 of file ClassSchema.php.

◆ BIT_CLASS_IS_AGGREGATE_ROOT

const TYPO3\CMS\Extbase\Reflection\ClassSchema::BIT_CLASS_IS_AGGREGATE_ROOT = 1 << 2
private

Definition at line 58 of file ClassSchema.php.

◆ BIT_CLASS_IS_CONTROLLER

const TYPO3\CMS\Extbase\Reflection\ClassSchema::BIT_CLASS_IS_CONTROLLER = 1 << 3
private

Definition at line 59 of file ClassSchema.php.

◆ BIT_CLASS_IS_ENTITY

const TYPO3\CMS\Extbase\Reflection\ClassSchema::BIT_CLASS_IS_ENTITY = 1 << 0
private

Definition at line 56 of file ClassSchema.php.

◆ BIT_CLASS_IS_SINGLETON

const TYPO3\CMS\Extbase\Reflection\ClassSchema::BIT_CLASS_IS_SINGLETON = 1 << 4
private

Definition at line 60 of file ClassSchema.php.

◆ BIT_CLASS_IS_VALUE_OBJECT

const TYPO3\CMS\Extbase\Reflection\ClassSchema::BIT_CLASS_IS_VALUE_OBJECT = 1 << 1
private

Definition at line 57 of file ClassSchema.php.