ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilWebDAVMountInstructionsFactory Class Reference
+ Collaboration diagram for ilWebDAVMountInstructionsFactory:

Public Member Functions

 __construct (ilWebDAVMountInstructionsRepositoryImpl $a_repo, RequestInterface $a_request, ilObjUser $a_user)
 
 getMountInstructionsObject ()
 

Private Attributes

ilWebDAVMountInstructionsRepositoryImpl $repo
 
RequestInterface $request
 
ilObjUser $user
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilWebDAVMountInstructionsFactory::__construct ( ilWebDAVMountInstructionsRepositoryImpl  $a_repo,
RequestInterface  $a_request,
ilObjUser  $a_user 
)

Definition at line 33 of file class.ilWebDAVMountInstructionsFactory.php.

References ILIAS\Repository\user().

37  {
38  $this->repo = $a_repo;
39  $this->request = $a_request;
40  $this->user = $a_user;
41  }
+ Here is the call graph for this function:

Member Function Documentation

◆ getMountInstructionsObject()

ilWebDAVMountInstructionsFactory::getMountInstructionsObject ( )

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

References ILIAS\Repository\int(), and ILIAS\Repository\user().

44  {
45  $uri_builder = new ilWebDAVUriBuilder($this->request);
46  $uri = $this->request->getUri()->getPath();
47 
48  $splitted_uri = explode('/', $uri);
49 
50  // Remove path elements before and until webdav script
51  while (array_shift($splitted_uri) != 'webdav.php' && count($splitted_uri) > 0);
52 
53  $path_value = $splitted_uri[1];
54 
55  if (strlen($path_value) == 2) {
57  $this->repo,
58  $uri_builder,
59  new ilSetting(),
60  $path_value
61  );
62  }
63 
64  if (substr($path_value, 0, 4) == 'ref_') {
66  $this->repo,
67  $uri_builder,
68  new ilSetting(),
69  $this->user->getLanguage(),
70  (int) substr($path_value, 4)
71  );
72  }
73 
74  throw new InvalidArgumentException("Invalid path given");
75  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Field Documentation

◆ $repo

ilWebDAVMountInstructionsRepositoryImpl ilWebDAVMountInstructionsFactory::$repo
private

Definition at line 29 of file class.ilWebDAVMountInstructionsFactory.php.

◆ $request

RequestInterface ilWebDAVMountInstructionsFactory::$request
private

Definition at line 30 of file class.ilWebDAVMountInstructionsFactory.php.

◆ $user

ilObjUser ilWebDAVMountInstructionsFactory::$user
private

Definition at line 31 of file class.ilWebDAVMountInstructionsFactory.php.


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