TypeConverterRegistry
Registry containing all available Type Converters, registered via Services.yaml.
not part of TYPO3 Core API, as this is a framework-internal registry.
Table of Contents
Properties
- $typeConverters : array<string, array<string, array<int, TypeConverterInterface>>>
Methods
- add() : void
- Used in the TypeConverterPass only.
- findTypeConverter() : TypeConverterInterface
- findEligibleConverterWithHighestPriority() : TypeConverterInterface|null
- findFirstEligibleTypeConverterInObjectHierarchy() : TypeConverterInterface|null
- Tries to find a suitable type converter for the given source type and target type.
- getConvertersForInterfaces() : array<string|int, TypeConverterInterface>
Properties
$typeConverters
protected
array<string, array<string, array<int, TypeConverterInterface>>>
$typeConverters
= []
Methods
add()
Used in the TypeConverterPass only.
public
add(TypeConverterInterface $converter, int $priority, array<string|int, mixed>|array<string|int, string> $sources, string $target) : void
Parameters
- $converter : TypeConverterInterface
- $priority : int
- $sources : array<string|int, mixed>|array<string|int, string>
- $target : string
Tags
findTypeConverter()
public
findTypeConverter(string $sourceType, string $targetType) : TypeConverterInterface
Parameters
- $sourceType : string
- $targetType : string
Tags
Return values
TypeConverterInterfacefindEligibleConverterWithHighestPriority()
protected
findEligibleConverterWithHighestPriority(array<int, TypeConverterInterface> $converters) : TypeConverterInterface|null
Parameters
- $converters : array<int, TypeConverterInterface>
Return values
TypeConverterInterface|nullfindFirstEligibleTypeConverterInObjectHierarchy()
Tries to find a suitable type converter for the given source type and target type.
protected
findFirstEligibleTypeConverterInObjectHierarchy(string $sourceType, class-string $targetClass) : TypeConverterInterface|null
Parameters
- $sourceType : string
-
Type of the source to convert from
- $targetClass : class-string
-
Name of the target class to find a type converter for
Tags
Return values
TypeConverterInterface|nullgetConvertersForInterfaces()
protected
getConvertersForInterfaces(array<string, array<int, TypeConverterInterface>> $convertersForSource, array<string|int, class-string> $interfaceNames) : array<string|int, TypeConverterInterface>
Parameters
- $convertersForSource : array<string, array<int, TypeConverterInterface>>
- $interfaceNames : array<string|int, class-string>