|
ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Background task handler for folder downloads. More...
Inheritance diagram for ilFolderDownloadBackgroundTaskHandler:
Collaboration diagram for ilFolderDownloadBackgroundTaskHandler:Public Member Functions | |
| __construct () | |
| Constructor. More... | |
| getRefIds () | |
| Gets the involved reference ids. More... | |
| setRefIds ($a_val) | |
| Sets the involved reference ids. More... | |
| init ($a_params=null) | |
| Init background task. More... | |
Public Member Functions inherited from ilZipBackgroundTaskHandler | |
| __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... | |
| getTask () | |
| Get current task instance. More... | |
| init ($a_params) | |
| Init background task. More... | |
| process () | |
| Process the task. More... | |
| cancel () | |
| Cancel the task. More... | |
| finish () | |
| Finish the task. More... | |
| deleteTaskAndFiles () | |
| Remove task and its files. More... | |
Static Public Member Functions | |
| static | getInstanceFromTask (ilBackgroundTask $a_task) |
| Constructor/Factory. More... | |
| static | isActive () |
| Is folder background download active? More... | |
| static | getObjectListAction ($a_ref_id) |
| Get object list action. More... | |
| static | initObjectListAction () |
| init js for background download More... | |
| static | getInstanceFromTask (ilBackgroundTask $a_task) |
| Constructor/Factory. More... | |
Protected Member Functions | |
| gatherFiles () | |
| Copy files to target directory. More... | |
| calculateRecursive ($a_ref_ids, &$a_file_count, &$a_file_size) | |
| Calculates the number and size of the files being downloaded recursively. More... | |
| recurseFolder ($a_ref_id, $a_title, $a_tmpdir, &$a_current_step) | |
| Copies a folder and its files to the specified temporary directory. More... | |
| copyFile ($a_obj_id, $a_title, $a_tmpdir, &$a_current_step) | |
| Copies a file to the specified temporary directory. More... | |
| validateAccess ($ref_id) | |
| Check file access. More... | |
| getDownloadSizeLimit () | |
| Get overall download size limit. More... | |
| getFileCountThreshold () | |
| Get file count threshold. More... | |
| getTotalSizeThreshold () | |
| Get total size threshold. More... | |
Protected Member Functions inherited from ilZipBackgroundTaskHandler | |
| 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 | |
| $settings | |
| $ref_ids = array() | |
Protected Attributes inherited from ilZipBackgroundTaskHandler | |
| $task | |
| $filename | |
Static Protected Attributes | |
| static | $initialized |
Static Private Member Functions | |
| static | renameDuplicateFile ($duplicate_filename) |
| bugfix mantis 24309: add a number in round brackets to the filename (in front of the file-type-extension) if there are identically named files in the same folder to prevent an exception being thrown More... | |
Static Private Attributes | |
| static | $duplicate_files = array() |
Background task handler for folder downloads.
Definition at line 12 of file class.ilFolderDownloadBackgroundTaskHandler.php.
| ilFolderDownloadBackgroundTaskHandler::__construct | ( | ) |
Constructor.
Reimplemented from ilZipBackgroundTaskHandler.
Definition at line 31 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References settings().
Here is the call graph for this function:
|
protected |
Calculates the number and size of the files being downloaded recursively.
| array | $a_ref_ids | |
| int | &$a_file_count | |
| int | &$a_file_size |
Definition at line 256 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $DIC, ilObjFileAccess\_lookupFileSize(), ilObject\_lookupObjId(), ilObject\_lookupType(), calculateRecursive(), and validateAccess().
Referenced by calculateRecursive(), and init().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Copies a file to the specified temporary directory.
| int | $a_obj_id | |
| string | $a_title | |
| string | $a_tmpdir | |
| int | &$a_current_step |
Definition at line 338 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References ilObjFile\_lookupAbsolutePath(), ilUtil\getASCIIFilename(), and renameDuplicateFile().
Referenced by gatherFiles(), and recurseFolder().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Copy files to target directory.
Reimplemented from ilZipBackgroundTaskHandler.
Definition at line 212 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References copyFile(), ilObjectFactory\getInstanceByRefId(), getRefIds(), ilZipBackgroundTaskHandler\getTempFolderPath(), recurseFolder(), and validateAccess().
Here is the call graph for this function:
|
protected |
Get overall download size limit.
Definition at line 438 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References settings().
Referenced by init().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Get file count threshold.
Definition at line 448 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References settings().
Referenced by init().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Constructor/Factory.
| ilBackgroundTask | $a_task |
Implements ilBackgroundTaskHandler.
Definition at line 37 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $DIC, $params, ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ilBackgroundTask\getParams().
Here is the call graph for this function:
|
static |
Get object list action.
| int | $a_ref_id |
Definition at line 104 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References initObjectListAction().
Referenced by ilObjectListGUI\insertCommand().
Here is the call graph for this function:
Here is the caller graph for this function:| ilFolderDownloadBackgroundTaskHandler::getRefIds | ( | ) |
Gets the involved reference ids.
Definition at line 77 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $ref_ids.
Referenced by gatherFiles(), and init().
Here is the caller graph for this function:
|
protected |
Get total size threshold.
Definition at line 458 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References settings().
Referenced by init().
Here is the call graph for this function:
Here is the caller graph for this function:| ilFolderDownloadBackgroundTaskHandler::init | ( | $a_params = null | ) |
Init background task.
| mixed | $a_params |
Implements ilBackgroundTaskHandler.
Definition at line 141 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $DIC, $ilUser, $lng, $res, ilZipBackgroundTaskHandler\$task, calculateRecursive(), ilZipBackgroundTaskHandler\finish(), ilUtil\formatSize(), ilBackgroundTask\getActiveByUserId(), ilBackgroundTaskJson\getBlockedJson(), getDownloadSizeLimit(), ilBackgroundTaskJson\getFailedJson(), getFileCountThreshold(), ilBackgroundTaskJson\getFinishedJson(), ilBackgroundTaskJson\getProcessingJson(), getRefIds(), getTotalSizeThreshold(), ilZipBackgroundTaskHandler\process(), setRefIds(), ilZipBackgroundTaskHandler\setTask(), sprintf, ilBackgroundTask\STATUS_FINISHED, and ilBackgroundTask\STATUS_INITIALIZED.
Here is the call graph for this function:
|
static |
init js for background download
Definition at line 115 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $DIC, $ilCtrl, $tpl, $url, and ilModalGUI\initJS().
Referenced by getObjectListAction(), and ilContainerContentGUI\renderItem().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Is folder background download active?
Definition at line 66 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $settings.
Referenced by ilObjectListGUI\insertCommand().
Here is the caller graph for this function:
|
protected |
Copies a folder and its files to the specified temporary directory.
| int | $a_ref_id | |
| string | $a_title | |
| string | $a_tmpdir | |
| int | &$a_current_step |
Definition at line 299 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $DIC, copyFile(), ilUtil\getASCIIFilename(), ilUtil\makeDir(), recurseFolder(), and validateAccess().
Referenced by gatherFiles(), and recurseFolder().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
bugfix mantis 24309: add a number in round brackets to the filename (in front of the file-type-extension) if there are identically named files in the same folder to prevent an exception being thrown
| $duplicate_filename | string filename including path and extension |
Definition at line 372 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References ilZipBackgroundTaskHandler\$filename, and $path.
Referenced by copyFile().
Here is the caller graph for this function:| ilFolderDownloadBackgroundTaskHandler::setRefIds | ( | $a_val | ) |
Sets the involved reference ids.
| array | $a_val |
Definition at line 87 of file class.ilFolderDownloadBackgroundTaskHandler.php.
Referenced by init().
Here is the caller graph for this function:
|
protected |
Check file access.
| int | $ref_id |
Definition at line 412 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $DIC, and ilObject\_isInTrash().
Referenced by calculateRecursive(), gatherFiles(), and recurseFolder().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Definition at line 17 of file class.ilFolderDownloadBackgroundTaskHandler.php.
|
staticprotected |
Definition at line 20 of file class.ilFolderDownloadBackgroundTaskHandler.php.
|
protected |
Definition at line 15 of file class.ilFolderDownloadBackgroundTaskHandler.php.
Referenced by getRefIds().
|
protected |
Definition at line 14 of file class.ilFolderDownloadBackgroundTaskHandler.php.
Referenced by isActive().