ILIAS
release_8 Revision v8.19
|
Class ilObjFileAbstractZipProcessor. More...
Public Member Functions | |
__construct (ResourceStakeholder $stakeholder, ilObjFileGUI $gui_object, Services $storage, ilFileServicesSettings $settings, $tree) | |
![]() | |
__construct (ResourceStakeholder $stakeholder, ilObjFileGUI $gui_object, Services $storage, ilFileServicesSettings $settings) | |
getInvalidFileNames () | |
![]() | |
process (ResourceIdentification $rid, array $options=[]) | |
Processes a given resource for the given arguments. More... | |
Protected Member Functions | |
createSurroundingContainer (ResourceIdentification $rid) | |
createContainerObj (string $dir_name, int $parent_id, array $options=[]) | |
Creates a container object depending on the parent's node type and returns it. More... | |
openZip (ResourceIdentification $rid) | |
Opens the zip archive of the given resource. More... | |
getZipFiles () | |
Yields the file-paths of the currently open zip-archive. More... | |
hasMultipleRootEntriesInZip () | |
getZipDirectories () | |
Yields the directory-paths of the currently open zip-archive. More... | |
storeZippedFile (string $file_path) | |
Creates an IRSS resource from the given filepath. More... | |
closeZip () | |
Closes the currently open zip-archive. More... | |
isWorkspace () | |
Returns whether the current context is workspace. More... | |
![]() | |
createFileObj (ResourceIdentification $rid, int $parent_id, array $options=[], bool $create_reference=false) | |
Creates an ilObjFile instance for the provided information. More... | |
applyOptions (ilObject $obj, array $options) | |
Apply provided options to the given object. More... | |
Protected Attributes | |
bool | $create_base_container_for_multiple_root_entries = false |
Unzip on operating systems may behave differently when unzipping if there are only one or more root nodes in the zip. More... | |
![]() | |
ilFileServicesPolicy | $policy |
ilFileServicesSettings | $settings |
ilCountPDFPages | $page_counter |
Services | $storage |
ResourceStakeholder | $stakeholder |
ilObjFileGUI | $gui_object |
array | $invalid_file_names = [] |
Private Member Functions | |
getZipPaths () | |
Yields all paths of the currently open zip-archive (without some macos stuff). More... | |
getPossibleContainerObj (int $parent_id) | |
Returns a container object that is possible for the given parent. More... | |
Private Attributes | |
const | IRSS_FILEPATH_KEY = 'uri' |
$tree | |
ZipArchive | $archive = null |
int | $id_type |
Additional Inherited Members | |
![]() | |
const | OPTION_FILENAME = 'title' |
const | OPTION_DESCRIPTION = 'description' |
const | OPTIONS |
Class ilObjFileAbstractZipProcessor.
Definition at line 29 of file class.ilObjFileAbstractZipProcessor.php.
ilObjFileAbstractZipProcessor::__construct | ( | ResourceStakeholder | $stakeholder, |
ilObjFileGUI | $gui_object, | ||
Services | $storage, | ||
ilFileServicesSettings | $settings, | ||
$tree | |||
) |
ilTree | ilWorkspaceTree | $tree |
Definition at line 56 of file class.ilObjFileAbstractZipProcessor.php.
References $tree, ILIAS\GlobalScreen\Provider\__construct(), and ilObject2GUI\getIdType().
|
protected |
Closes the currently open zip-archive.
Definition at line 220 of file class.ilObjFileAbstractZipProcessor.php.
Referenced by ilObjFileUnzipFlatProcessor\process(), and ilObjFileUnzipRecursiveProcessor\process().
|
protected |
Creates a container object depending on the parent's node type and returns it.
Definition at line 83 of file class.ilObjFileAbstractZipProcessor.php.
References ilObjFileAbstractProcessor\applyOptions(), and getPossibleContainerObj().
Referenced by createSurroundingContainer(), and ilObjFileUnzipRecursiveProcessor\process().
|
protected |
Definition at line 69 of file class.ilObjFileAbstractZipProcessor.php.
References createContainerObj().
Referenced by ilObjFileUnzipFlatProcessor\process(), and ilObjFileUnzipRecursiveProcessor\process().
|
private |
Returns a container object that is possible for the given parent.
int | $parent_id |
Definition at line 241 of file class.ilObjFileAbstractZipProcessor.php.
References $type, ilObject\_lookupType(), and isWorkspace().
Referenced by createContainerObj().
|
protected |
Yields the directory-paths of the currently open zip-archive.
This fixes the issue that win and mac zip archives have different directory structures.
Definition at line 176 of file class.ilObjFileAbstractZipProcessor.php.
References $path, and getZipPaths().
Referenced by hasMultipleRootEntriesInZip(), and ilObjFileUnzipRecursiveProcessor\process().
|
protected |
Yields the file-paths of the currently open zip-archive.
Definition at line 138 of file class.ilObjFileAbstractZipProcessor.php.
References $path, and getZipPaths().
Referenced by hasMultipleRootEntriesInZip(), ilObjFileUnzipFlatProcessor\process(), and ilObjFileUnzipRecursiveProcessor\process().
|
private |
Yields all paths of the currently open zip-archive (without some macos stuff).
Definition at line 118 of file class.ilObjFileAbstractZipProcessor.php.
Referenced by getZipDirectories(), and getZipFiles().
|
protected |
Definition at line 147 of file class.ilObjFileAbstractZipProcessor.php.
References getZipDirectories(), and getZipFiles().
Referenced by ilObjFileUnzipRecursiveProcessor\process().
|
protected |
Returns whether the current context is workspace.
Definition at line 230 of file class.ilObjFileAbstractZipProcessor.php.
References ilObject2GUI\WORKSPACE_NODE_ID.
Referenced by getPossibleContainerObj().
|
protected |
Opens the zip archive of the given resource.
Definition at line 103 of file class.ilObjFileAbstractZipProcessor.php.
Referenced by ilObjFileUnzipFlatProcessor\process(), and ilObjFileUnzipRecursiveProcessor\process().
|
protected |
Creates an IRSS resource from the given filepath.
Definition at line 204 of file class.ilObjFileAbstractZipProcessor.php.
Referenced by ilObjFileUnzipFlatProcessor\process(), and ilObjFileUnzipRecursiveProcessor\process().
|
private |
Definition at line 41 of file class.ilObjFileAbstractZipProcessor.php.
|
protected |
Unzip on operating systems may behave differently when unzipping if there are only one or more root nodes in the zip.
Currently, the behavior is the same as in ILIAS 7 and earlier, that in any case the zip structure is checked out directly at the current location in the magazine. If this value is set to true here, another category/folder will be placed around the files and folders of the zip when unpacking if more than one root-node is present. For example, macOS behaves in exactly this way.
Definition at line 51 of file class.ilObjFileAbstractZipProcessor.php.
|
private |
Definition at line 42 of file class.ilObjFileAbstractZipProcessor.php.
|
private |
Definition at line 39 of file class.ilObjFileAbstractZipProcessor.php.
Referenced by __construct().
|
private |
Definition at line 34 of file class.ilObjFileAbstractZipProcessor.php.