src/FieldHandlers/Config/ConfigFactory.php
public static function getByType(string $type, string $field, $table = '', array $options = []) : ConfigInterface
    {
        $configClass = __NAMESPACE__ . '\\' . ucfirst($type) . 'Config';
        if (!class_exists($configClass)) {
            throw new InvalidArgumentException("Configuration type [$type] is not supported");
        }

        $result = new $configClass($field, $table, $options);

        return $result;
    }
public static function getByType(string $type, string $field, $table = '', array $options = []) : ConfigInterface
    {
        $configClass = __NAMESPACE__ . '\\' . ucfirst($type) . 'Config';
        if (!class_exists($configClass)) {
            throw new InvalidArgumentException("Configuration type [$type] is not supported");
        }

        $result = new $configClass($field, $table, $options);

        return $result;
    }
public static function getByType ( string $ type , string $ field , $ table = '' , array $ options = [ ] ) : ConfigInterface { $ configClass = __NAMESPACE__ . '\\' . ucfirst ( $ type ) . 'Config' ; if ( ! class_exists ( $ configClass ) ) { throw new InvalidArgumentException ( "Configuration type [$type] is not supported" ) ; } $ result = new $ configClass ( $ field , $ table , $ options ) ; return $ result ; }
Get configuration instance by type

@throws \InvalidArgumentException for unsupported configuration types
@param string $type Configuration type (e.g.: string, email, uuid)
@param string $field Field name
@param \Cake\Datasource\RepositoryInterface|string $table Table name or instance
@param mixed[] $options Configuration options
@return \CsvMigrations\FieldHandlers\Config\ConfigInterface
Get configuration instance by type