ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDAVClientNode Class Reference
+ Inheritance diagram for ilDAVClientNode:
+ Collaboration diagram for ilDAVClientNode:

Public Member Functions

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

Protected Member Functions

 getRefIdFromName (string $name)
 

Protected Attributes

ilWebDAVObjFactory $dav_factory
 
ilWebDAVRepositoryHelper $repository_helper
 
string $client_name
 
string $name_of_repository_root
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

References $client_name, $dav_factory, and $repository_helper.

43  {
44  $this->dav_factory = $dav_factory;
45  $this->repository_helper = $repository_helper;
46  $this->client_name = $client_name;
47  $this->name_of_repository_root = 'ILIAS';
48  }
ilWebDAVObjFactory $dav_factory
ilWebDAVRepositoryHelper $repository_helper

Member Function Documentation

◆ childExists()

ilDAVClientNode::childExists (   $name)

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

References Vendor\Package\$e, $name, $ref_id, getRefIdFromName(), and ROOT_FOLDER_ID.

75  : bool
76  {
77  try {
78  $ref_id = $this->getRefIdFromName($name);
79  return $this->repository_helper->objectWithRefIdExists($ref_id) && $this->repository_helper->checkAccess('read', $ref_id);
80  } catch (BadRequest $e) {
81  }
82 
83  return $this->checkIfChildExistsByParentRefId($this->repository_helper, $this->dav_factory, ROOT_FOLDER_ID, $name);
84  }
const ROOT_FOLDER_ID
Definition: constants.php:32
if($format !==null) $name
Definition: metadata.php:247
$ref_id
Definition: ltiauth.php:67
getRefIdFromName(string $name)
+ Here is the call graph for this function:

◆ getChild()

ilDAVClientNode::getChild (   $name)

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

References Vendor\Package\$e, $name, $ref_id, getRefIdFromName(), and ROOT_FOLDER_ID.

55  : INode
56  {
57  try {
58  $ref_id = $this->getRefIdFromName($name);
59 
60  return $this->dav_factory->retrieveDAVObjectByRefID($ref_id);
61  } catch (NotFound $e) {
62  }
63 
64  return $this->getChildByParentRefId($this->repository_helper, $this->dav_factory, ROOT_FOLDER_ID, $name);
65  }
const ROOT_FOLDER_ID
Definition: constants.php:32
if($format !==null) $name
Definition: metadata.php:247
$ref_id
Definition: ltiauth.php:67
getRefIdFromName(string $name)
+ Here is the call graph for this function:

◆ getChildren()

ilDAVClientNode::getChildren ( )
Returns
ilObject[]

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

References ROOT_FOLDER_ID.

70  : array
71  {
72  return $this->getChildrenByParentRefId($this->repository_helper, $this->dav_factory, ROOT_FOLDER_ID);
73  }
const ROOT_FOLDER_ID
Definition: constants.php:32

◆ getLastModified()

ilDAVClientNode::getLastModified ( )

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

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

◆ getName()

ilDAVClientNode::getName ( )

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

References $client_name.

50  : string
51  {
52  return $this->client_name;
53  }

◆ getRefIdFromName()

ilDAVClientNode::getRefIdFromName ( string  $name)
protected

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

References $ref_id.

Referenced by childExists(), and getChild().

91  : int
92  {
93  $ref_parts = explode('_', $name);
94  if (count($ref_parts) == 2 && ($ref_id = (int) $ref_parts[1]) > 0) {
95  return $ref_id;
96  }
97 
98  throw new NotFound("No id found for $name");
99  }
if($format !==null) $name
Definition: metadata.php:247
$ref_id
Definition: ltiauth.php:67
+ Here is the caller graph for this function:

Field Documentation

◆ $client_name

string ilDAVClientNode::$client_name
protected

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

Referenced by __construct(), and getName().

◆ $dav_factory

ilWebDAVObjFactory ilDAVClientNode::$dav_factory
protected

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

Referenced by __construct().

◆ $name_of_repository_root

string ilDAVClientNode::$name_of_repository_root
protected

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

◆ $repository_helper

ilWebDAVRepositoryHelper ilDAVClientNode::$repository_helper
protected

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

Referenced by __construct().


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