ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilWebDAVUriBuilder Class Reference
+ Collaboration diagram for ilWebDAVUriBuilder:

Public Member Functions

 __construct (protected RequestInterface $request)
 
 getWebDavDefaultUri (int $a_ref_id)
 
 getWebDavNautilusUri (int $a_ref_id)
 
 getWebDavKonquerorUri (int $a_ref_id)
 
 getUriToMountInstructionModalByRef (int $a_ref_id)
 
 getUriToMountInstructionModalByLanguage (string $language)
 

Protected Member Functions

 changePathToWebDavScript (string $a_original_path)
 
 getWebDavPathToRef (int $a_ref_id)
 
 getWebDavPathToLanguageTemplate (string $language)
 
 getWebDavUriByPlaceholderName (string $placeholder_name, int $a_ref_id)
 

Protected Attributes

array $schemas
 
array string $mount_instructions_query = 'mount-instructions'
 
string $webdav_script_name = 'webdav.php'
 
UriInterface $uri
 
string $host
 
string $client_id = CLIENT_ID
 
string $web_path_to_script
 

Detailed Description

Definition at line 24 of file class.ilWebDAVUriBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

ilWebDAVUriBuilder::__construct ( protected RequestInterface  $request)

Definition at line 42 of file class.ilWebDAVUriBuilder.php.

References changePathToWebDavScript().

43  {
44  $this->uri = $this->request->getUri();
45  $this->host = $this->uri->getHost();
46  $this->web_path_to_script = $this->changePathToWebDavScript($this->uri->getPath());
47  }
changePathToWebDavScript(string $a_original_path)
+ Here is the call graph for this function:

Member Function Documentation

◆ changePathToWebDavScript()

ilWebDAVUriBuilder::changePathToWebDavScript ( string  $a_original_path)
protected

Definition at line 49 of file class.ilWebDAVUriBuilder.php.

References $webdav_script_name.

Referenced by __construct().

49  : string
50  {
51  $exploded_path = explode('/', $a_original_path);
52 
53  if (in_array($this->webdav_script_name, $exploded_path)) {
54  return implode('/', array_splice($exploded_path, 0, -2));
55  }
56 
57  return implode('/', array_splice($exploded_path, 0, -1)) . '/' . $this->webdav_script_name;
58  }
+ Here is the caller graph for this function:

◆ getUriToMountInstructionModalByLanguage()

ilWebDAVUriBuilder::getUriToMountInstructionModalByLanguage ( string  $language)

Definition at line 99 of file class.ilWebDAVUriBuilder.php.

References $mount_instructions_query, and getWebDavPathToLanguageTemplate().

99  : string
100  {
101  return $this->getWebDavPathToLanguageTemplate($language) . '?' . $this->mount_instructions_query;
102  }
array string $mount_instructions_query
getWebDavPathToLanguageTemplate(string $language)
+ Here is the call graph for this function:

◆ getUriToMountInstructionModalByRef()

ilWebDAVUriBuilder::getUriToMountInstructionModalByRef ( int  $a_ref_id)

Definition at line 94 of file class.ilWebDAVUriBuilder.php.

References $mount_instructions_query, and getWebDavPathToRef().

Referenced by ilObjFolderListGUI\getCommandLink(), ilObjGroupListGUI\getCommandLink(), ilObjCategoryListGUI\getCommandLink(), ilObjectListGUI\getCommandLink(), and ilContainerGUI\showPasswordInstructionObject().

94  : string
95  {
96  return $this->getWebDavPathToRef($a_ref_id) . '?' . $this->mount_instructions_query;
97  }
array string $mount_instructions_query
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getWebDavDefaultUri()

ilWebDAVUriBuilder::getWebDavDefaultUri ( int  $a_ref_id)

Definition at line 79 of file class.ilWebDAVUriBuilder.php.

References getWebDavUriByPlaceholderName().

79  : string
80  {
81  return $this->getWebDavUriByPlaceholderName('default', $a_ref_id);
82  }
getWebDavUriByPlaceholderName(string $placeholder_name, int $a_ref_id)
+ Here is the call graph for this function:

◆ getWebDavKonquerorUri()

ilWebDAVUriBuilder::getWebDavKonquerorUri ( int  $a_ref_id)

Definition at line 89 of file class.ilWebDAVUriBuilder.php.

References getWebDavUriByPlaceholderName().

89  : string
90  {
91  return $this->getWebDavUriByPlaceholderName('konqueror', $a_ref_id);
92  }
getWebDavUriByPlaceholderName(string $placeholder_name, int $a_ref_id)
+ Here is the call graph for this function:

◆ getWebDavNautilusUri()

ilWebDAVUriBuilder::getWebDavNautilusUri ( int  $a_ref_id)

Definition at line 84 of file class.ilWebDAVUriBuilder.php.

References getWebDavUriByPlaceholderName().

84  : string
85  {
86  return $this->getWebDavUriByPlaceholderName('nautilus', $a_ref_id);
87  }
getWebDavUriByPlaceholderName(string $placeholder_name, int $a_ref_id)
+ Here is the call graph for this function:

◆ getWebDavPathToLanguageTemplate()

ilWebDAVUriBuilder::getWebDavPathToLanguageTemplate ( string  $language)
protected

Definition at line 65 of file class.ilWebDAVUriBuilder.php.

Referenced by getUriToMountInstructionModalByLanguage().

65  : string
66  {
67  return "$this->web_path_to_script/$this->client_id/$language";
68  }
+ Here is the caller graph for this function:

◆ getWebDavPathToRef()

ilWebDAVUriBuilder::getWebDavPathToRef ( int  $a_ref_id)
protected

Definition at line 60 of file class.ilWebDAVUriBuilder.php.

Referenced by getUriToMountInstructionModalByRef(), and getWebDavUriByPlaceholderName().

60  : string
61  {
62  return "$this->web_path_to_script/$this->client_id/ref_$a_ref_id";
63  }
+ Here is the caller graph for this function:

◆ getWebDavUriByPlaceholderName()

ilWebDAVUriBuilder::getWebDavUriByPlaceholderName ( string  $placeholder_name,
int  $a_ref_id 
)
protected

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

References getWebDavPathToRef().

Referenced by getWebDavDefaultUri(), getWebDavKonquerorUri(), and getWebDavNautilusUri().

70  : string
71  {
72  $scheme = $this->schemas[$placeholder_name];
73  if ($this->uri->getScheme() === 'https') {
74  $scheme .= 's';
75  }
76  return $scheme . '://' . $this->host . $this->getWebDavPathToRef($a_ref_id);
77  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $client_id

string ilWebDAVUriBuilder::$client_id = CLIENT_ID
protected

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

◆ $host

string ilWebDAVUriBuilder::$host
protected

Definition at line 38 of file class.ilWebDAVUriBuilder.php.

◆ $mount_instructions_query

array string ilWebDAVUriBuilder::$mount_instructions_query = 'mount-instructions'
protected

◆ $schemas

array ilWebDAVUriBuilder::$schemas
protected
Initial value:
= [
'default' => 'http'

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

◆ $uri

UriInterface ilWebDAVUriBuilder::$uri
protected

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

◆ $web_path_to_script

string ilWebDAVUriBuilder::$web_path_to_script
protected

Definition at line 40 of file class.ilWebDAVUriBuilder.php.

◆ $webdav_script_name

string ilWebDAVUriBuilder::$webdav_script_name = 'webdav.php'
protected

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

Referenced by changePathToWebDavScript().


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