ILIAS
Release_4_4_x_branch Revision 61816
|
ilCloudFileTree class More...
Public Member Functions | |
__construct ($root_path="/", $root_id="root", $id, $service_name) | |
getId () | |
getRootPath () | |
getServiceName () | |
isCaseSensitive () | |
setCaseSensitive ($case_sensitive) | |
getRootNode () | |
addNode ($path, $id, $is_Dir, $modified=null, $size=0) | |
removeNode ($path) | |
getItemList () | |
getNodeFromPath ($path="/") | |
getNodeFromId ($id) | |
setLoadingOfFolderComplete ($path) | |
updateFileTree ($current_path) | |
addItemsFromService ($folder_id) | |
addFolderToService ($id, $folder_name) | |
uploadFileToService ($current_id, $tmp_name, $file_name) | |
deleteFromService ($id) | |
downloadFromService ($id) | |
storeFileTreeToSession () | |
orderListAlphabet ($path1, $path2) | |
getSortedListOfChildren (ilCloudFileNode $node) | |
getListForJSONEncode () |
Static Public Member Functions | |
static | getFileTreeFromSession () |
static | clearFileTreeSession () |
Protected Member Functions | |
setId ($id) | |
setRootPath ($path="/") | |
setServiceName ($service_name) | |
createNode ($path="/", $id, $is_dir=false) |
Protected Attributes | |
$id = 0 | |
$root_node = null | |
$root_path = "" | |
$item_list = array() | |
$id_to_path_map = array() | |
Only for better performance. | |
$service_name = "" | |
$case_sensitive = false |
ilCloudFileTree class
Representation of the structure of all files and folders so far. Not really a tree but a list simulating a tree (for faster access on the nodes). This class also calls the functions of a service to update the tree (addToFileTree, deleteItem, etc.)
Definition at line 20 of file class.ilCloudFileTree.php.
ilCloudFileTree::__construct | ( | $root_path = "/" , |
|
$root_id = "root" , |
|||
$id, | |||
$service_name | |||
) |
string | $root_path | |
string | $root_id | |
int | $id | |
string | $service_name | |
bool | $case_sensitive |
Definition at line 66 of file class.ilCloudFileTree.php.
References $id, $root_path, $service_name, createNode(), ilCloudConnector\getServiceClass(), setCaseSensitive(), setId(), and setServiceName().
ilCloudFileTree::addFolderToService | ( | $id, | |
$folder_name | |||
) |
$id | |
$folder_name |
ilCloudException |
Definition at line 313 of file class.ilCloudFileTree.php.
References $id, $path, addItemsFromService(), ilCloudException\FOLDER_ALREADY_EXISTING_ON_SERVICE, ilCloudException\FOLDER_CREATION_FAILED, getId(), getNodeFromId(), getNodeFromPath(), ilCloudConnector\getServiceClass(), getServiceName(), ilCloudException\INVALID_INPUT, ilCloudUtil\joinPaths(), ilCloudUtil\normalizePath(), and storeFileTreeToSession().
ilCloudFileTree::addItemsFromService | ( | $folder_id | ) |
$path |
ilCloudException |
Definition at line 287 of file class.ilCloudFileTree.php.
References ilCloudException\ADD_ITEMS_FROM_SERVICE_FAILED, getId(), getNodeFromId(), ilCloudConnector\getServiceClass(), getServiceName(), and ilCloudException\ID_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION.
Referenced by addFolderToService(), and updateFileTree().
ilCloudFileTree::addNode | ( | $path, | |
$id, | |||
$is_Dir, | |||
$modified = null , |
|||
$size = 0 |
|||
) |
$path | ||
$is_Dir | ||
null | $modified | |
int | $size |
Definition at line 169 of file class.ilCloudFileTree.php.
References $id, $path, $size, createNode(), getNodeFromId(), getNodeFromPath(), ilCloudException\ID_ALREADY_EXISTS_IN_FILE_TREE_IN_SESSION, ilCloudUtil\normalizePath(), and ilCloudException\PATH_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION.
|
static |
Definition at line 457 of file class.ilCloudFileTree.php.
References $_SESSION.
|
protected |
string | $path | |
bool | $is_dir |
Definition at line 153 of file class.ilCloudFileTree.php.
References $id, $path, and ilCloudUtil\normalizePath().
Referenced by __construct(), and addNode().
ilCloudFileTree::deleteFromService | ( | $id | ) |
$id |
ilCloudException |
Definition at line 394 of file class.ilCloudFileTree.php.
References $id, ilCloudException\DELETE_FAILED, getId(), getNodeFromId(), ilCloudConnector\getServiceClass(), getServiceName(), removeNode(), and storeFileTreeToSession().
ilCloudFileTree::downloadFromService | ( | $id | ) |
$id |
ilCloudException |
Definition at line 418 of file class.ilCloudFileTree.php.
References $id, ilCloudException\DOWNLOAD_FAILED, getId(), getNodeFromId(), ilCloudConnector\getServiceClass(), and getServiceName().
|
static |
Definition at line 444 of file class.ilCloudFileTree.php.
References $_SESSION.
Referenced by ilCloudPluginDeleteGUI\asyncDeleteItem(), ilObjCloudGUI\asyncGetActionListContent(), ilObjCloudGUI\asyncGetBlock(), ilCloudPluginCreateFolderGUI\createFolder(), ilCloudPluginDeleteGUI\deleteItem(), ilObjCloudGUI\executeCommand(), ilObjCloudGUI\getFile(), and ilCloudPluginUploadGUI\handleFileUpload().
ilCloudFileTree::getId | ( | ) |
Definition at line 86 of file class.ilCloudFileTree.php.
References $id.
Referenced by addFolderToService(), addItemsFromService(), deleteFromService(), downloadFromService(), and uploadFileToService().
ilCloudFileTree::getItemList | ( | ) |
Definition at line 214 of file class.ilCloudFileTree.php.
References $item_list.
Referenced by getListForJSONEncode().
ilCloudFileTree::getListForJSONEncode | ( | ) |
Definition at line 494 of file class.ilCloudFileTree.php.
References $path, and getItemList().
ilCloudFileTree::getNodeFromId | ( | $id | ) |
$id |
Definition at line 245 of file class.ilCloudFileTree.php.
References $id.
Referenced by addFolderToService(), addItemsFromService(), addNode(), deleteFromService(), downloadFromService(), removeNode(), and uploadFileToService().
ilCloudFileTree::getNodeFromPath | ( | $path = "/" | ) |
string | $path |
Definition at line 223 of file class.ilCloudFileTree.php.
References $path, and isCaseSensitive().
Referenced by addFolderToService(), addNode(), orderListAlphabet(), removeNode(), setLoadingOfFolderComplete(), and updateFileTree().
ilCloudFileTree::getRootNode | ( | ) |
Definition at line 143 of file class.ilCloudFileTree.php.
References $root_node.
ilCloudFileTree::getRootPath | ( | ) |
ilCloudFileTree::getServiceName | ( | ) |
Definition at line 119 of file class.ilCloudFileTree.php.
References $service_name.
Referenced by addFolderToService(), addItemsFromService(), deleteFromService(), downloadFromService(), and uploadFileToService().
ilCloudFileTree::getSortedListOfChildren | ( | ilCloudFileNode | $node | ) |
ilCloudFileNode | $node |
Definition at line 484 of file class.ilCloudFileTree.php.
References ilCloudFileNode\getChildrenPathes().
ilCloudFileTree::isCaseSensitive | ( | ) |
Definition at line 127 of file class.ilCloudFileTree.php.
References $case_sensitive.
Referenced by getNodeFromPath().
ilCloudFileTree::orderListAlphabet | ( | $path1, | |
$path2 | |||
) |
$path1 | |
$path2 |
Definition at line 467 of file class.ilCloudFileTree.php.
References getNodeFromPath().
ilCloudFileTree::removeNode | ( | $path | ) |
$path |
Definition at line 202 of file class.ilCloudFileTree.php.
References $path, getNodeFromId(), and getNodeFromPath().
Referenced by deleteFromService().
ilCloudFileTree::setCaseSensitive | ( | $case_sensitive | ) |
boolean | $case_sensitive |
Definition at line 135 of file class.ilCloudFileTree.php.
References $case_sensitive.
Referenced by __construct().
|
protected |
int | $id |
Definition at line 78 of file class.ilCloudFileTree.php.
References $id.
Referenced by __construct().
ilCloudFileTree::setLoadingOfFolderComplete | ( | $path | ) |
$path |
ilCloudException |
Definition at line 254 of file class.ilCloudFileTree.php.
References $path, getNodeFromPath(), and ilCloudException\PATH_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION.
|
protected |
string | $path |
Definition at line 95 of file class.ilCloudFileTree.php.
References $path, and ilCloudUtil\normalizePath().
|
protected |
string | $service_name |
Definition at line 111 of file class.ilCloudFileTree.php.
References $service_name.
Referenced by __construct().
ilCloudFileTree::storeFileTreeToSession | ( | ) |
Definition at line 435 of file class.ilCloudFileTree.php.
References $_SESSION.
Referenced by addFolderToService(), deleteFromService(), ilCloudPluginInitGUI\initGUI(), updateFileTree(), and uploadFileToService().
ilCloudFileTree::updateFileTree | ( | $current_path | ) |
$current_path |
Definition at line 267 of file class.ilCloudFileTree.php.
References addItemsFromService(), getNodeFromPath(), and storeFileTreeToSession().
ilCloudFileTree::uploadFileToService | ( | $current_id, | |
$tmp_name, | |||
$file_name | |||
) |
$id | |
$tmp_name | |
$file_name |
ilCloudException |
Definition at line 358 of file class.ilCloudFileTree.php.
References getId(), getNodeFromId(), ilCloudConnector\getPluginClass(), ilCloudConnector\getServiceClass(), getServiceName(), storeFileTreeToSession(), ilCloudException\UPLOAD_FAILED, and ilCloudException\UPLOAD_FAILED_MAX_FILESIZE.
|
protected |
Definition at line 57 of file class.ilCloudFileTree.php.
Referenced by isCaseSensitive(), and setCaseSensitive().
|
protected |
Definition at line 27 of file class.ilCloudFileTree.php.
Referenced by __construct(), addFolderToService(), addNode(), createNode(), deleteFromService(), downloadFromService(), getId(), getNodeFromId(), and setId().
|
protected |
Only for better performance.
Definition at line 47 of file class.ilCloudFileTree.php.
|
protected |
Definition at line 42 of file class.ilCloudFileTree.php.
Referenced by getItemList().
|
protected |
Definition at line 32 of file class.ilCloudFileTree.php.
Referenced by getRootNode().
|
protected |
Definition at line 38 of file class.ilCloudFileTree.php.
Referenced by __construct(), and getRootPath().
|
protected |
Definition at line 52 of file class.ilCloudFileTree.php.
Referenced by __construct(), getServiceName(), and setServiceName().