ImportManager implements IErrorable
FinalYes
Table of Contents
Interfaces
Constants
- CHUNK_SIZE = 5242880
- ERROR_COULD_NOT_FIND_CLOUD_IMPORT = 'DISK_IMM_22003'
- ERROR_REQUIRED_PARAMETER = 'DISK_IMM_22001'
Methods
- __construct() : mixed
- ImportManager constructor.
- buildByAttachedObject() : static
- forkImport() : mixed
- getDocumentHandler() : DocumentHandler
- getErrorByCode() : array<string|int, Error>
- Getting once error with the necessary code.
- getErrors() : array<string|int, Error>
- Getting array of errors.
- getErrorsByCode() : array<string|int, Error>
- Getting array of errors with the necessary code.
- hasNewVersion() : bool|null
- Checks new version in cloud service by Entry. Compares eTag.
- saveFile() : File|null
- Saves file in destination folder from entry of cloud import.
- startImport() : Model|null|static
- Creates cloud import entry to store data about potential new file.
- uploadChunk() : bool
- Uploads new chunk from cloud drive if necessary.
- uploadVersion() : mixed
Constants
CHUNK_SIZE
public
mixed
CHUNK_SIZE
= 5242880
ERROR_COULD_NOT_FIND_CLOUD_IMPORT
public
mixed
ERROR_COULD_NOT_FIND_CLOUD_IMPORT
= 'DISK_IMM_22003'
ERROR_REQUIRED_PARAMETER
public
mixed
ERROR_REQUIRED_PARAMETER
= 'DISK_IMM_22001'
Methods
__construct()
ImportManager constructor.
public
__construct(DocumentHandler $documentHandler) : mixed
Parameters
- $documentHandler : DocumentHandler
buildByAttachedObject()
public
static buildByAttachedObject(AttachedObject $attachedObject) : static
Parameters
- $attachedObject : AttachedObject
Tags
Return values
staticforkImport()
public
forkImport(Entry $cloudImport) : mixed
Parameters
- $cloudImport : Entry
getDocumentHandler()
public
getDocumentHandler() : DocumentHandler
Return values
DocumentHandlergetErrorByCode()
Getting once error with the necessary code.
public
getErrorByCode(mixed $code) : array<string|int, Error>
Parameters
- $code : mixed
-
Code of error.
Tags
Return values
array<string|int, Error>getErrors()
Getting array of errors.
public
getErrors() : array<string|int, Error>
Return values
array<string|int, Error>getErrorsByCode()
Getting array of errors with the necessary code.
public
getErrorsByCode(mixed $code) : array<string|int, Error>
Parameters
- $code : mixed
-
Code of error.
Tags
Return values
array<string|int, Error>hasNewVersion()
Checks new version in cloud service by Entry. Compares eTag.
public
hasNewVersion(Entry $cloudImport) : bool|null
Parameters
- $cloudImport : Entry
Return values
bool|nullsaveFile()
Saves file in destination folder from entry of cloud import.
public
saveFile(Entry $entry, Folder $folder) : File|null
Parameters
- $entry : Entry
-
Cloud import entry.
- $folder : Folder
-
Destination folder.
Return values
File|null —New file object.
startImport()
Creates cloud import entry to store data about potential new file.
public
startImport(string $fileId) : Model|null|static
Parameters
- $fileId : string
-
Id in cloud service.
Tags
Return values
Model|null|static —Cloud import entry.
uploadChunk()
Uploads new chunk from cloud drive if necessary.
public
uploadChunk(Entry $entry) : bool
Parameters
- $entry : Entry
-
Cloud import entry.
Return values
booluploadVersion()
public
uploadVersion(Entry $entry) : mixed
Parameters
- $entry : Entry