# CRUDlex\DataFactoryInterface

- CRUDlex\MySQLDataFactory

interface `DataFactoryInterface`

  An interface used by the ServiceProvider to construct 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, FilesystemInterface $filesystem)

    Creates instances.

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