ArchiveManager
class ArchiveManager
Properties
protectedstring | $disk | Storage disk for uploaded import archives. | |
protectedstring | $tmpPath | Base path to the temporary directory to store extracted imports. | |
protectedarray | $importTypes | Class names of available imports. |
Methods
__construct()
Create a new instance.
string
store(UploadedFile$file)
Stores an uploaded archive file and returns its token.
bool
has(string$token)
Determine if the files of an import with tthe given token exist.
delete(string$token)
Delete the files of an import.
prune()
Delete uploaded import files that are older than one week.
string
generateToken()
Generates a new token for an import.
validate(string$token)
Validate the uploaded import archive.
Details
at line39
__construct()
Create a new instance.
at line59
string
store(UploadedFile$file)
Stores an uploaded archive file and returns its token.
at line80
bool
has(string$token)
Determine if the files of an import with tthe given token exist.
at line92
Import|null
get(string$token)
Get the correct import instance for the import with the given token.
at line141
delete(string$token)
Delete the files of an import.
at line151
prune()
Delete uploaded import files that are older than one week.
at line167
protectedstring
generateToken()
Generates a new token for an import.
at line178
protected
validate(string$token)
Validate the uploaded import archive.