ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilDAVClientNode Class Reference
+ Inheritance diagram for ilDAVClientNode:
+ Collaboration diagram for ilDAVClientNode:

Public Member Functions

 __construct (protected string $client_name, protected ilWebDAVObjFactory $dav_factory, protected ilWebDAVRepositoryHelper $repository_helper)
 
 getName ()
 
 getChild ($name)
 
 getChildren ()
 
 childExists ($name)
 
 getLastModified ()
 

Protected Member Functions

 getRefIdFromName (string $name)
 

Protected Attributes

string $name_of_repository_root = 'ILIAS'
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDAVClientNode::__construct ( protected string  $client_name,
protected ilWebDAVObjFactory  $dav_factory,
protected ilWebDAVRepositoryHelper  $repository_helper 
)

Definition at line 36 of file class.ilDAVClientNode.php.

40 {
41 }

Member Function Documentation

◆ childExists()

ilDAVClientNode::childExists (   $name)

Definition at line 68 of file class.ilDAVClientNode.php.

68 : bool
69 {
70 try {
71 $ref_id = $this->getRefIdFromName($name);
72 return $this->repository_helper->objectWithRefIdExists($ref_id) && $this->repository_helper->checkAccess(
73 'read',
75 );
76 } catch (BadRequest) {
77 }
78
79 return $this->checkIfChildExistsByParentRefId(
80 $this->repository_helper,
81 $this->dav_factory,
83 $name
84 );
85 }
getRefIdFromName(string $name)
const ROOT_FOLDER_ID
Definition: constants.php:32
$ref_id
Definition: ltiauth.php:66

References $ref_id, getRefIdFromName(), and ROOT_FOLDER_ID.

+ Here is the call graph for this function:

◆ getChild()

ilDAVClientNode::getChild (   $name)

Definition at line 48 of file class.ilDAVClientNode.php.

48 : INode
49 {
50 try {
51 $ref_id = $this->getRefIdFromName($name);
52
53 return $this->dav_factory->retrieveDAVObjectByRefID($ref_id);
54 } catch (NotFound) {
55 }
56
57 return $this->getChildByParentRefId($this->repository_helper, $this->dav_factory, ROOT_FOLDER_ID, $name);
58 }

References $ref_id, getRefIdFromName(), and ROOT_FOLDER_ID.

+ Here is the call graph for this function:

◆ getChildren()

ilDAVClientNode::getChildren ( )
Returns
ilObject[]

Definition at line 63 of file class.ilDAVClientNode.php.

63 : array
64 {
65 return $this->getChildrenByParentRefId($this->repository_helper, $this->dav_factory, ROOT_FOLDER_ID);
66 }

References ROOT_FOLDER_ID.

◆ getLastModified()

ilDAVClientNode::getLastModified ( )

Definition at line 87 of file class.ilDAVClientNode.php.

87 : int
88 {
89 return strtotime('2000-01-01');
90 }

◆ getName()

ilDAVClientNode::getName ( )

Definition at line 43 of file class.ilDAVClientNode.php.

43 : string
44 {
45 return $this->client_name;
46 }

◆ getRefIdFromName()

ilDAVClientNode::getRefIdFromName ( string  $name)
protected

Definition at line 92 of file class.ilDAVClientNode.php.

92 : int
93 {
94 $ref_parts = explode('_', $name);
95 if (count($ref_parts) == 2 && ($ref_id = (int) $ref_parts[1]) > 0) {
96 return $ref_id;
97 }
98
99 throw new NotFound("No id found for $name");
100 }

References $ref_id.

Referenced by childExists(), and getChild().

+ Here is the caller graph for this function:

Field Documentation

◆ $name_of_repository_root

string ilDAVClientNode::$name_of_repository_root = 'ILIAS'
protected

Definition at line 34 of file class.ilDAVClientNode.php.


The documentation for this class was generated from the following file: