ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

References $ref_id, getRefIdFromName(), and ROOT_FOLDER_ID.

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',
74  $ref_id
75  );
76  } catch (BadRequest) {
77  }
78 
79  return $this->checkIfChildExistsByParentRefId(
80  $this->repository_helper,
81  $this->dav_factory,
83  $name
84  );
85  }
const ROOT_FOLDER_ID
Definition: constants.php:32
$ref_id
Definition: ltiauth.php:65
getRefIdFromName(string $name)
+ Here is the call graph for this function:

◆ getChild()

ilDAVClientNode::getChild (   $name)

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

References $ref_id, getRefIdFromName(), and ROOT_FOLDER_ID.

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  }
const ROOT_FOLDER_ID
Definition: constants.php:32
$ref_id
Definition: ltiauth.php:65
getRefIdFromName(string $name)
+ Here is the call graph for this function:

◆ getChildren()

ilDAVClientNode::getChildren ( )
Returns
ilObject[]

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

References ROOT_FOLDER_ID.

63  : array
64  {
65  return $this->getChildrenByParentRefId($this->repository_helper, $this->dav_factory, ROOT_FOLDER_ID);
66  }
const ROOT_FOLDER_ID
Definition: constants.php:32

◆ 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.

References $ref_id.

Referenced by childExists(), and getChild().

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  }
$ref_id
Definition: ltiauth.php:65
+ 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: