|
ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
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 |
Background task handler for folder downloads.
Definition at line 12 of file class.ilFolderDownloadBackgroundTaskHandler.php.
| ilFolderDownloadBackgroundTaskHandler::__construct | ( | ) |
Constructor.
Reimplemented from ilZipBackgroundTaskHandler.
Definition at line 28 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 264 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $ref_id, 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 353 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References ilObjFile\_lookupAbsolutePath(), and ilUtil\getASCIIFilename().
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 216 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $ref_id, 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 405 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 415 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 34 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $params, $ref_id, 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 100 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 73 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 425 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 135 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $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 111 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $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 62 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 311 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References 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:| ilFolderDownloadBackgroundTaskHandler::setRefIds | ( | $a_val | ) |
Sets the involved reference ids.
| array | $a_val |
Definition at line 83 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 378 of file class.ilFolderDownloadBackgroundTaskHandler.php.
References $ref_id, 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:
|
staticprotected |
Definition at line 17 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().