# CRUDlex\DataFactoryInterface

- CRUDlex\MySQLDataFactory

interface `DataFactoryInterface`

  An interface used by the {@see ServiceProvider} to construct {@see Data} instances. By implementing this and handing it into the service provider, the user can control what database (-variation) he wants to use.

  `createData`(EntityDefinition $definition, FileProcessorInterface $fileProcessor)

    Creates instances.

    Parameters: | $definition (EntityDefinition) – the definition of the entities managed by the to be created instance $fileProcessor (FileProcessorInterface) – the file processor managing uploaded files
    Returns: | AbstractData the newly created instance