ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class ilWebDAVObjDAVHelper. More...
Public Member Functions | |
__construct (ilWebDAVRepositoryHelper $repo_helper) | |
ilWebDAVObjDAVHelper constructor. More... | |
isDAVableObject ($id, $is_reference=true, $do_name_check=true) | |
Check if given object (either obj_id or ref_id) is compatible to be represented as a WebDAV object. More... | |
isDAVableObjType (string $type) | |
Check if the given object type is compatible to be represented as a WebDAV object. More... | |
isDAVableObjTitle (string $title) | |
Check if title is displayable in WebDAV. More... | |
hasTitleForbiddenChars (string $title) | |
Check for forbidden chars in title that are making trouble if displayed in WebDAV. More... | |
hasInvalidPrefixInTitle (string $title) | |
Forbidden are titles that begin with a single dot. More... | |
createDAVObjectForRefId (int $ref_id, string $type='') | |
Creates a DAV Object for the given ref id. More... | |
isValidFileNameWithValidFileExtension (string $a_title) | |
Protected Attributes | |
$repo_helper | |
Class ilWebDAVObjDAVHelper.
This class is a helper class for WebDAV functionalities that are used from ilObj*DAV Objects. With this class, the behavior of the objects itself are unit testable.
Definition at line 12 of file class.ilWebDAVObjDAVHelper.php.
ilWebDAVObjDAVHelper::__construct | ( | ilWebDAVRepositoryHelper | $repo_helper | ) |
ilWebDAVObjDAVHelper constructor.
ilWebDAVRepositoryHelper | $repo_helper |
Definition at line 22 of file class.ilWebDAVObjDAVHelper.php.
References $repo_helper.
ilWebDAVObjDAVHelper::createDAVObjectForRefId | ( | int | $ref_id, |
string | $type = '' |
||
) |
Creates a DAV Object for the given ref id.
integer | $ref_id | |
string | $type |
Definition at line 119 of file class.ilWebDAVObjDAVHelper.php.
References $type.
ilWebDAVObjDAVHelper::hasInvalidPrefixInTitle | ( | string | $title | ) |
Forbidden are titles that begin with a single dot.
There are also forbidden prefixes like '.$' or '..'. But since they both start with a single dot, we can aim only for that.
$title |
Definition at line 106 of file class.ilWebDAVObjDAVHelper.php.
Referenced by isDAVableObjTitle().
ilWebDAVObjDAVHelper::hasTitleForbiddenChars | ( | string | $title | ) |
Check for forbidden chars in title that are making trouble if displayed in WebDAV.
$title |
Definition at line 88 of file class.ilWebDAVObjDAVHelper.php.
Referenced by isDAVableObjTitle().
ilWebDAVObjDAVHelper::isDAVableObject | ( | $id, | |
$is_reference = true , |
|||
$do_name_check = true |
|||
) |
Check if given object (either obj_id or ref_id) is compatible to be represented as a WebDAV object.
$id | ||
bool | $is_reference | |
bool | $do_name_check |
Definition at line 34 of file class.ilWebDAVObjDAVHelper.php.
References $id, $title, $type, isDAVableObjTitle(), and isDAVableObjType().
ilWebDAVObjDAVHelper::isDAVableObjTitle | ( | string | $title | ) |
Check if title is displayable in WebDAV.
$title |
Definition at line 76 of file class.ilWebDAVObjDAVHelper.php.
References hasInvalidPrefixInTitle(), and hasTitleForbiddenChars().
Referenced by isDAVableObject(), and isValidFileNameWithValidFileExtension().
ilWebDAVObjDAVHelper::isDAVableObjType | ( | string | $type | ) |
Check if the given object type is compatible to be represented as a WebDAV object.
$type |
Definition at line 56 of file class.ilWebDAVObjDAVHelper.php.
Referenced by isDAVableObject().
ilWebDAVObjDAVHelper::isValidFileNameWithValidFileExtension | ( | string | $a_title | ) |
$a_title |
ilFileUtilsException |
Definition at line 152 of file class.ilWebDAVObjDAVHelper.php.
References ilFileUtils\getValidFilename(), and isDAVableObjTitle().
|
protected |
Definition at line 15 of file class.ilWebDAVObjDAVHelper.php.
Referenced by __construct().