Adds phpdoc comments

main
Yasen Pramatarov 2024-11-29 18:34:54 +02:00
parent da75076130
commit 28f9fa1007
1 changed files with 26 additions and 4 deletions

View File

@ -1,8 +1,19 @@
<?php
/**
* class Config
*
* Handles editing and fetching configuration files.
*/
class Config {
// edit the config file
/**
* Edits a configuration file by updating specified options.
*
* @param array $updatedConfig Key-value pairs of configuration options to update.
* @param string $config_file Path to the configuration file.
* @return mixed Returns true on success, or an error message on failure.
*/
public function editConfigFile($updatedConfig, $config_file) {
// first we get a fresh config file contents as text
$config_contents = file_get_contents($config_file);
@ -39,7 +50,13 @@ class Config {
}
// loading the config.js
/**
* Loads the config.js file from the Jitsi server.
*
* @param string $jitsiUrl The base URL of the Jitsi server.
* @param bool $raw Whether to return the full file (true) or only uncommented values (false).
* @return string The content of the config.js file or an error message.
*/
public function getPlatformConfigjs($jitsiUrl, $raw = false) {
// constructing the URL
$configjsFile = $jitsiUrl . '/config.js';
@ -81,7 +98,13 @@ class Config {
}
// loading the interface_config.js
/**
* Loads the interface_config.js file from the Jitsi server.
*
* @param string $jitsiUrl The base URL of the Jitsi server.
* @param bool $raw Whether to return the full file (true) or only uncommented values (false).
* @return string The content of the interface_config.js file or an error message.
*/
public function getPlatformInterfaceConfigjs($jitsiUrl, $raw = false) {
// constructing the URL
$interfaceConfigjsFile = $jitsiUrl . '/interface_config.js';
@ -122,7 +145,6 @@ class Config {
}
}
?>