ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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
 
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.

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)

References changePathToWebDavScript().

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

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 }

References $webdav_script_name.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ getUriToMountInstructionModalByLanguage()

ilWebDAVUriBuilder::getUriToMountInstructionModalByLanguage ( string  $language)

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

99 : string
100 {
102 }
getWebDavPathToLanguageTemplate(string $language)

References $mount_instructions_query, and getWebDavPathToLanguageTemplate().

+ Here is the call graph for this function:

◆ getUriToMountInstructionModalByRef()

ilWebDAVUriBuilder::getUriToMountInstructionModalByRef ( int  $a_ref_id)

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

94 : string
95 {
96 return $this->getWebDavPathToRef($a_ref_id) . '?' . $this->mount_instructions_query;
97 }

References $mount_instructions_query, and getWebDavPathToRef().

+ Here is the call graph for this function:

◆ getWebDavDefaultUri()

ilWebDAVUriBuilder::getWebDavDefaultUri ( int  $a_ref_id)

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

79 : string
80 {
81 return $this->getWebDavUriByPlaceholderName('default', $a_ref_id);
82 }
getWebDavUriByPlaceholderName(string $placeholder_name, int $a_ref_id)

References getWebDavUriByPlaceholderName().

+ Here is the call graph for this function:

◆ getWebDavKonquerorUri()

ilWebDAVUriBuilder::getWebDavKonquerorUri ( int  $a_ref_id)

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

89 : string
90 {
91 return $this->getWebDavUriByPlaceholderName('konqueror', $a_ref_id);
92 }

References getWebDavUriByPlaceholderName().

+ Here is the call graph for this function:

◆ getWebDavNautilusUri()

ilWebDAVUriBuilder::getWebDavNautilusUri ( int  $a_ref_id)

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

84 : string
85 {
86 return $this->getWebDavUriByPlaceholderName('nautilus', $a_ref_id);
87 }

References getWebDavUriByPlaceholderName().

+ Here is the call graph for this function:

◆ getWebDavPathToLanguageTemplate()

ilWebDAVUriBuilder::getWebDavPathToLanguageTemplate ( string  $language)
protected

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

65 : string
66 {
67 return "$this->web_path_to_script/$this->client_id/$language";
68 }

Referenced by getUriToMountInstructionModalByLanguage().

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

60 : string
61 {
62 return "$this->web_path_to_script/$this->client_id/ref_$a_ref_id";
63 }

Referenced by getUriToMountInstructionModalByRef(), and getWebDavUriByPlaceholderName().

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

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 }

References getWebDavPathToRef().

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

+ 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

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

◆ $schemas

array ilWebDAVUriBuilder::$schemas
protected
Initial value:
= [
'default' => 'http',
'konqueror' => 'webdav',
'nautilus' => 'dav'
]

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: