ILIAS
trunk Revision v11.0_alpha-1761-g6dbbfa7b760
|
Class ilObjFileAbstractZipProcessor. More...
Public Member Functions | |
__construct (ResourceStakeholder $stakeholder, ilObjFileGUI $gui_object, Services $storage, ilFileServicesSettings $settings, private $tree) | |
![]() | |
__construct (protected ResourceStakeholder $stakeholder, protected ilObjFileGUI $gui_object, protected Services $storage, protected ilFileServicesSettings $settings) | |
getInvalidFileNames () | |
![]() | |
process (ResourceIdentification $rid, ?string $title=null, ?string $description=null, ?string $copyright_id=null) | |
Processes a given resource for the given arguments. More... | |
Protected Member Functions | |
createSurroundingContainer (ResourceIdentification $rid) | |
createContainerObj (string $dir_name, int $parent_id) | |
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, ?string $title=null, ?string $description=null, ?string $copyright_id=null, bool $create_reference=false) | |
Creates an ilObjFile instance for the provided information. 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 |
ilCountPDFPages | $page_counter |
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' |
ZipArchive | $archive = null |
int | $id_type |
Class ilObjFileAbstractZipProcessor.
Definition at line 29 of file class.ilObjFileAbstractZipProcessor.php.
ilObjFileAbstractZipProcessor::__construct | ( | ResourceStakeholder | $stakeholder, |
ilObjFileGUI | $gui_object, | ||
Services | $storage, | ||
ilFileServicesSettings | $settings, | ||
private | $tree | ||
) |
ilTree | ilWorkspaceTree | $tree |
Definition at line 51 of file class.ilObjFileAbstractZipProcessor.php.
References ILIAS\GlobalScreen\Provider\__construct(), and ilObject2GUI\getIdType().
|
protected |
Closes the currently open zip-archive.
Definition at line 216 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 77 of file class.ilObjFileAbstractZipProcessor.php.
References getPossibleContainerObj().
Referenced by createSurroundingContainer(), and ilObjFileUnzipRecursiveProcessor\process().
|
protected |
Definition at line 63 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.
Definition at line 236 of file class.ilObjFileAbstractZipProcessor.php.
References 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 173 of file class.ilObjFileAbstractZipProcessor.php.
References $path, ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from(), getZipPaths(), and ILIAS\UI\examples\Symbol\Glyph\Sort\sort().
Referenced by hasMultipleRootEntriesInZip(), and ilObjFileUnzipRecursiveProcessor\process().
|
protected |
Yields the file-paths of the currently open zip-archive.
Definition at line 131 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 108 of file class.ilObjFileAbstractZipProcessor.php.
References $path.
Referenced by getZipDirectories(), and getZipFiles().
|
protected |
Definition at line 144 of file class.ilObjFileAbstractZipProcessor.php.
References getZipDirectories(), and getZipFiles().
Referenced by ilObjFileUnzipRecursiveProcessor\process().
|
protected |
Returns whether the current context is workspace.
Definition at line 226 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 93 of file class.ilObjFileAbstractZipProcessor.php.
Referenced by ilObjFileUnzipFlatProcessor\process(), and ilObjFileUnzipRecursiveProcessor\process().
|
protected |
Creates an IRSS resource from the given filepath.
Definition at line 200 of file class.ilObjFileAbstractZipProcessor.php.
Referenced by ilObjFileUnzipFlatProcessor\process(), and ilObjFileUnzipRecursiveProcessor\process().
|
private |
Definition at line 36 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 46 of file class.ilObjFileAbstractZipProcessor.php.
|
private |
Definition at line 37 of file class.ilObjFileAbstractZipProcessor.php.
|
private |
Definition at line 34 of file class.ilObjFileAbstractZipProcessor.php.