DataProviders provide a unified way, how import data flows into Translate5.
All DataProviders reside under the name space "editor_Models_Import_DataProvider_".
Depending on Translate5 default import or client specific interfaces, import data can be specified in the following forms:
- Single file Upload: handled by class SingleUploads (extending Directory)
- As plain import directory: handled by class Directory (extending Abstract)
- As zip container: handled by class Zip (extending Abstract)
- As URL to a zip container: handled by class ZippedUrl (extending Zip)
In general each DataProvider converts its data to a directory structure (importRootFolder) consumed finally by the Importer.
In addition the DataProviders can:
- archive the data to be imported, Method "archiveImportedData"
- handle file clean up on import exceptions, Method "postImportHandler"
- provide a post import handler, Method "handleImportException"
This three steps are handled slightly different by the existing DataProviders.
editor_Models_Import_DataProvider_Abstract
archiveImportedData
Abstract method, to be implemented.
postImportHandler
Calls event "beforeArchiveImportedData" and then archiveImportedData.
handleImportException
Empty sub Method here.