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

Public Member Functions

 __construct (string $className)
 
 getProperty (string $propertyName)
 
array Property[] getProperties ()
 
Property[] getDomainObjectProperties ()
 
 hasProperty (string $propertyName)
 
 getMethod (string $methodName)
 
array Method[] getMethods ()
 
 hasMethod (string $methodName)
 

Protected Member Functions

 reflectProperties (\ReflectionClass $reflectionClass)
 
 reflectMethods (\ReflectionClass $reflectionClass)
 

Protected Attributes

string $className
 
array $properties = array( )
 

Private Member Functions

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

Private Attributes

const BIT_CLASS_IS_CONTROLLER = 1 << 3
 
BitSet $bitSet
 
array $methods = array( )
 

Static Private Attributes

static array $propertyObjects = array( )
 
static array $methodObjects = array( )
 
static PropertyInfoExtractor $propertyInfoExtractor = null
 
static DocBlockFactoryInterface $docBlockFactory = null
 

Detailed Description

A class schema

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

Definition at line 49 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 92 of file ClassSchema.php.

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

Member Function Documentation

◆ buildMethodObjects()

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

◆ buildPropertyObjects()

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

◆ getDomainObjectProperties()

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

Returns all properties that do not start with an underscore like $_localizedUid

Returns
Property[]

Definition at line 444 of file ClassSchema.php.

References TYPO3\CMS\Extbase\Reflection\ClassSchema\Property\getName(), and TYPO3\CMS\Extbase\Reflection\ClassSchema\getProperties().

◆ getMethod()

◆ getMethods()

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

Definition at line 479 of file ClassSchema.php.

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

◆ getProperties()

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

◆ getProperty()

TYPO3\CMS\Extbase\Reflection\ClassSchema::getProperty ( string  $propertyName)
Exceptions
NoSuchPropertyException

Definition at line 419 of file ClassSchema.php.

References TYPO3\CMS\Extbase\Reflection\ClassSchema\$properties, TYPO3\CMS\Extbase\Reflection\ClassSchema\buildPropertyObjects(), and TYPO3\CMS\Extbase\Reflection\ClassSchema\Exception\NoSuchPropertyException\create().

Referenced by TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\arrayAccessAndTraversableProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\arrayProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\arrayProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\boolProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\boolProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\classSchemaDetectsCascadeProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\classSchemaDetectsCascadePropertyFromAttribute(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\classSchemaDetectsCascadePropertyOnlyWithVarAnnotation(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\classSchemaDetectsTransientProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\classSchemaDetectsTransientPropertyFromAttribute(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\classSchemaDetectsTypeAndElementType(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\classSchemaDetectsTypeAndElementTypeWithoutFQCN(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\classSchemaDetectsTypeFromPropertyWithNullableStringTypeHint(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\classSchemaDetectsTypeFromPropertyWithStringTypeHint(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\classSchemaDetectsValidateAnnotationsModelProperties(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\classSchemaDetectsValidateAttributeModelProperties(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\classSchemaDetectsValidateAttributeOnPromotedModelProperties(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\concreteEntityOrLazyLoadingProxyProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\concreteEntityOrLazyLoadingProxyProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\filterLazyLoadingProxyAndLazyObjectStorageFiltersLazyLoadingProxy(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\filterLazyLoadingProxyAndLazyObjectStorageFiltersLazyObjectStorage(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\floatProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\floatProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\intOrStringProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\intOrStringProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\intProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\intProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\isObjectStorageTypeDetectsLazyObjectStorage(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\PropertyTest\isObjectStorageTypeDetectsObjectStorage(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\lazyObjectStorage(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\lazyObjectStorage(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\listWithArraySyntaxWithKeyValueTypeProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\listWithArraySyntaxWithKeyValueTypeProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\listWithArraySyntaxWithoutKeyValueTypeProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\listWithArraySyntaxWithoutKeyValueTypeProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\listWithSquareBracketsSyntaxProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\listWithSquareBracketsSyntaxProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\mixedProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\mixedProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\nullableIntOrStringProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\nullableIntOrStringProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\nullableIntProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\nullableIntProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\nullableMixedProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\objectProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\objectProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\objectStorageProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\objectStorageProperty(), TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest\objectStorageWithArraySyntaxWithoutKeyValueTypeProperty(), and TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest\objectStorageWithArraySyntaxWithoutKeyValueTypeProperty().

◆ hasMethod()

TYPO3\CMS\Extbase\Reflection\ClassSchema::hasMethod ( string  $methodName)

Definition at line 484 of file ClassSchema.php.

◆ hasProperty()

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

If the class schema has a certain property.

Parameters
string$propertyName‪Name of the property

Definition at line 457 of file ClassSchema.php.

◆ reflectMethods()

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

Definition at line 240 of file ClassSchema.php.

References $validator, 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 55 of file ClassSchema.php.

◆ $className

◆ $docBlockFactory

DocBlockFactoryInterface TYPO3\CMS\Extbase\Reflection\ClassSchema::$docBlockFactory = null
staticprivate

◆ $methodObjects

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

Definition at line 63 of file ClassSchema.php.

◆ $methods

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

Definition at line 79 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 75 of file ClassSchema.php.

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

◆ $propertyInfoExtractor

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

Definition at line 81 of file ClassSchema.php.

◆ $propertyObjects

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

Definition at line 59 of file ClassSchema.php.

◆ BIT_CLASS_IS_CONTROLLER

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

Definition at line 51 of file ClassSchema.php.