ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Background task handler for zip creation. More...
Public Member Functions | |
__construct () | |
Constructor. More... | |
setDeliveryFilename ($a_value) | |
Sets the delivery file name. More... | |
getDeliveryFilename () | |
Gets the delivery file name. More... | |
getTask () | |
Get current task instance. More... | |
process () | |
Process the task. More... | |
cancel () | |
Cancel download. More... | |
finish () | |
Finish download. More... | |
deliver () | |
Deliver file. More... | |
deleteTaskAndFiles () | |
Remove task and its files. More... | |
Public Member Functions inherited from ilBackgroundTaskHandler | |
init ($a_params) | |
Init background task. More... | |
Protected Member Functions | |
setTask (ilBackgroundTask $a_task) | |
Set current task instance. More... | |
gatherFiles () | |
Copy files to target directory. More... | |
deleteTempFiles ($a_delete_zip=true) | |
Deletes the temporary files and folders belonging to this download. More... | |
getTempFolderPath () | |
Gets the temporary folder path to copy the files and folders to. More... | |
getTempZipFilePath () | |
Gets the full path of the temporary zip file that gets created. More... | |
getTempBasePath () | |
Gets the temporary base path for all files and folders related to this download. More... | |
Protected Attributes | |
$task | |
$filename | |
Private Attributes | |
$log | |
Additional Inherited Members | |
Static Public Member Functions inherited from ilBackgroundTaskHandler | |
static | getInstanceFromTask (ilBackgroundTask $a_task) |
Constructor/Factory. More... | |
Background task handler for zip creation.
Definition at line 12 of file class.ilZipBackgroundTaskHandler.php.
ilZipBackgroundTaskHandler::__construct | ( | ) |
Constructor.
Definition at line 27 of file class.ilZipBackgroundTaskHandler.php.
References ilLoggerFactory\getLogger(), and settings().
ilZipBackgroundTaskHandler::cancel | ( | ) |
Cancel download.
Implements ilBackgroundTaskHandler.
Definition at line 117 of file class.ilZipBackgroundTaskHandler.php.
References deleteTempFiles(), and ilBackgroundTask\STATUS_CANCELLED.
Referenced by process().
ilZipBackgroundTaskHandler::deleteTaskAndFiles | ( | ) |
Remove task and its files.
Implements ilBackgroundTaskHandler.
Definition at line 154 of file class.ilZipBackgroundTaskHandler.php.
References deleteTempFiles(), and gatherFiles().
|
protected |
Deletes the temporary files and folders belonging to this download.
bool | $a_delete_zip |
Definition at line 183 of file class.ilZipBackgroundTaskHandler.php.
References ilUtil\delDir(), getTempFolderPath(), and getTempZipFilePath().
Referenced by cancel(), deleteTaskAndFiles(), and finish().
ilZipBackgroundTaskHandler::deliver | ( | ) |
Deliver file.
Definition at line 147 of file class.ilZipBackgroundTaskHandler.php.
References ilUtil\deliverFile(), getDeliveryFilename(), and getTempZipFilePath().
ilZipBackgroundTaskHandler::finish | ( | ) |
Finish download.
Implements ilBackgroundTaskHandler.
Definition at line 131 of file class.ilZipBackgroundTaskHandler.php.
References $DIC, $ilCtrl, $url, array, and deleteTempFiles().
Referenced by ilFolderDownloadBackgroundTaskHandler\init().
|
abstractprotected |
Copy files to target directory.
Referenced by deleteTaskAndFiles(), and process().
ilZipBackgroundTaskHandler::getDeliveryFilename | ( | ) |
Gets the delivery file name.
Definition at line 52 of file class.ilZipBackgroundTaskHandler.php.
References $filename.
Referenced by deliver().
ilZipBackgroundTaskHandler::getTask | ( | ) |
Get current task instance.
Implements ilBackgroundTaskHandler.
Definition at line 72 of file class.ilZipBackgroundTaskHandler.php.
References $task.
|
protected |
Gets the temporary base path for all files and folders related to this download.
Definition at line 235 of file class.ilZipBackgroundTaskHandler.php.
References ilUtil\getDataDir().
Referenced by getTempFolderPath(), and getTempZipFilePath().
|
protected |
Gets the temporary folder path to copy the files and folders to.
Definition at line 215 of file class.ilZipBackgroundTaskHandler.php.
References getTempBasePath().
Referenced by deleteTempFiles(), ilFolderDownloadBackgroundTaskHandler\gatherFiles(), and process().
|
protected |
Gets the full path of the temporary zip file that gets created.
Definition at line 225 of file class.ilZipBackgroundTaskHandler.php.
References getTempBasePath().
Referenced by deleteTempFiles(), deliver(), and process().
ilZipBackgroundTaskHandler::process | ( | ) |
Process the task.
Implements ilBackgroundTaskHandler.
Definition at line 77 of file class.ilZipBackgroundTaskHandler.php.
References cancel(), ilUtil\delDir(), gatherFiles(), getTempFolderPath(), getTempZipFilePath(), ilUtil\makeDirParents(), ilBackgroundTask\STATUS_FINISHED, and ilUtil\zip().
Referenced by ilFolderDownloadBackgroundTaskHandler\init().
ilZipBackgroundTaskHandler::setDeliveryFilename | ( | $a_value | ) |
Sets the delivery file name.
string |
Definition at line 42 of file class.ilZipBackgroundTaskHandler.php.
|
protected |
Set current task instance.
ilBackgroundTask | $a_task |
Definition at line 62 of file class.ilZipBackgroundTaskHandler.php.
Referenced by ilFolderDownloadBackgroundTaskHandler\init().
|
protected |
Definition at line 15 of file class.ilZipBackgroundTaskHandler.php.
Referenced by getDeliveryFilename(), and ilFolderDownloadBackgroundTaskHandler\renameDuplicateFile().
|
private |
Definition at line 20 of file class.ilZipBackgroundTaskHandler.php.
|
protected |
Definition at line 14 of file class.ilZipBackgroundTaskHandler.php.
Referenced by getTask(), and ilFolderDownloadBackgroundTaskHandler\init().