Classes/TcaDataGenerator/FieldGeneratorResolver.php
public function resolve(array $data): FieldGeneratorInterface
    {
        $generator = NULL;
        foreach ($this->fieldValueGenerators as $fieldValueGenerator) {
            $generator = GeneralUtility::makeInstance($fieldValueGenerator);
            if (!$generator instanceof FieldGeneratorInterface) {
                throw new Exception(
                    'Field value generator ' . $fieldValueGenerator . ' must implement FieldGeneratorInterface',
                    1457693564
                );
            }
            if ($generator->match($data)) {
                break;
            } else {
                $generator = null;
            }
        }
        if (is_null($generator)) {
            throw new GeneratorNotFoundException(
                'No generator found',
                1457873493
            );
        }
        return $generator;
    }
public function resolve(array $data): FieldGeneratorInterface
    {
        $generator = NULL;
        foreach ($this->fieldValueGenerators as $fieldValueGenerator) {
            $generator = GeneralUtility::makeInstance($fieldValueGenerator);
            if (!$generator instanceof FieldGeneratorInterface) {
                throw new Exception(
                    'Field value generator ' . $fieldValueGenerator . ' must implement FieldGeneratorInterface',
                    1457693564
                );
            }
            if ($generator->match($data)) {
                break;
            } else {
                $generator = null;
            }
        }
        if (is_null($generator)) {
            throw new GeneratorNotFoundException(
                'No generator found',
                1457873493
            );
        }
        return $generator;
    }
public function resolve ( array $ data ) : FieldGeneratorInterface { $ generator = NULL ; foreach ( $ this -> fieldValueGenerators as $ fieldValueGenerator ) { $ generator = GeneralUtility :: makeInstance ( $ fieldValueGenerator ) ; if ( ! $ generator instanceof FieldGeneratorInterface ) { throw new Exception ( 'Field value generator ' . $ fieldValueGenerator . ' must implement FieldGeneratorInterface' , 1457693564 ) ; } if ( $ generator -> match ( $ data ) ) { break ; } else { $ generator = null ; } } if ( is_null ( $ generator ) ) { throw new GeneratorNotFoundException ( 'No generator found' , 1457873493 ) ; } return $ generator ; }
Resolve a generator class and return its instance.
Either returns an instance of FieldGeneratorInterface or throws exception

@param array $data Criteria data
@return FieldGeneratorInterface
@throws GeneratorNotFoundException|Exception
Resolve a generator class and return its instance . Either returns an instance of FieldGeneratorInterface or throws exception