protected function getTypeConverter($source, $targetType, $configuration)
    {
        $compositeType = $this->parseCompositeType($targetType);

        if (in_array($compositeType, ['\\ArrayObject', 'array'])) {
            $typeConverter = $this->objectManager->get(ArrayConverter::class);
        } else {
            $typeConverter = $this->findTypeConverter($source, $targetType, $configuration);

            if ($typeConverter instanceof ExtbaseArrayConverter) {
                $typeConverter = $this->objectManager->get(ArrayConverter::class);
            } elseif ($typeConverter instanceof ObjectConverter) {
                $typeConverter = $this->getObjectConverter();
            }
        }

        if (!is_object($typeConverter) || !$typeConverter instanceof TypeConverterInterface) {
            throw new TypeConverterException('Type converter for "' . $source . '" -> "' . $targetType . '" not found.');
        }

        return $typeConverter;
    }
protected function getTypeConverter($source, $targetType, $configuration)
    {
        $compositeType = $this->parseCompositeType($targetType);

        if (in_array($compositeType, ['\\ArrayObject', 'array'])) {
            $typeConverter = $this->objectManager->get(ArrayConverter::class);
        } else {
            $typeConverter = $this->findTypeConverter($source, $targetType, $configuration);

            if ($typeConverter instanceof ExtbaseArrayConverter) {
                $typeConverter = $this->objectManager->get(ArrayConverter::class);
            } elseif ($typeConverter instanceof ObjectConverter) {
                $typeConverter = $this->getObjectConverter();
            }
        }

        if (!is_object($typeConverter) || !$typeConverter instanceof TypeConverterInterface) {
            throw new TypeConverterException('Type converter for "' . $source . '" -> "' . $targetType . '" not found.');
        }

        return $typeConverter;
    }
protected function getTypeConverter ( $ source , $ targetType , $ configuration ) { $ compositeType = $ this -> parseCompositeType ( $ targetType ) ; if ( in_array ( $ compositeType , [ '\\ArrayObject' , 'array' ] ) ) { $ typeConverter = $ this -> objectManager -> get ( ArrayConverter :: class ) ; } else { $ typeConverter = $ this -> findTypeConverter ( $ source , $ targetType , $ configuration ) ; if ( $ typeConverter instanceof ExtbaseArrayConverter ) { $ typeConverter = $ this -> objectManager -> get ( ArrayConverter :: class ) ; } elseif ( $ typeConverter instanceof ObjectConverter ) { $ typeConverter = $ this -> getObjectConverter ( ) ; } } if ( ! is_object ( $ typeConverter ) || ! $ typeConverter instanceof TypeConverterInterface ) { throw new TypeConverterException ( 'Type converter for "' . $ source . '" -> "' . $ targetType . '" not found.' ) ; } return $ typeConverter ; }
This function will fetch the type converter which will convert the source
to the requested target type.

@param mixed $source
@param mixed $targetType
@param mixed $configuration
@return TypeConverterInterface
@throws TypeConverterException
This function will fetch the type converter which will convert the source to the requested target type .