◆ createClientConfigFile()
ilChatroomConfigFileHandler::createClientConfigFile |
( |
array |
$settings | ) |
|
◆ createDataDirIfNotExists()
ilChatroomConfigFileHandler::createDataDirIfNotExists |
( |
| ) |
|
|
protected |
Creates a data directory for configuration files, if the directory does not already exists.
- Returns
- string
- Exceptions
-
Exception | Throws Exception if data dir creation failed |
Definition at line 89 of file class.ilChatroomConfigFileHandler.php.
References $path, ilUtil\getDataDir(), and ilUtil\makeDir().
Referenced by writeDataToFile().
93 if(!file_exists(
$path))
97 throw new Exception(
'Directory cannot be created');
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static getDataDir()
get data directory (outside webspace)
◆ createServerConfigFile()
ilChatroomConfigFileHandler::createServerConfigFile |
( |
array |
$settings | ) |
|
Creates a server config file and saves it to the chatroom data directory.
- Parameters
-
- Exceptions
-
Definition at line 109 of file class.ilChatroomConfigFileHandler.php.
References getServerFileContent(), and writeDataToFile().
112 $this->
writeDataToFile($content, self::CHATROOM_SERVER_CONFIG_FILENAME);
getServerFileContent(array $settings)
Get the server config file contetn as json encoded string.
writeDataToFile($content, $filename)
Writes $content to file named by $filename.
◆ getServerFileContent()
ilChatroomConfigFileHandler::getServerFileContent |
( |
array |
$settings | ) |
|
|
protected |
Get the server config file contetn as json encoded string.
- Parameters
-
- Returns
- string
Definition at line 120 of file class.ilChatroomConfigFileHandler.php.
Referenced by createServerConfigFile().
122 unset($settings[
'ilias_proxy']);
123 unset($settings[
'client_proxy']);
124 unset($settings[
'ilias_url']);
125 unset($settings[
'client_url']);
127 return json_encode($settings, JSON_PRETTY_PRINT);
◆ writeDataToFile()
ilChatroomConfigFileHandler::writeDataToFile |
( |
|
$content, |
|
|
|
$filename |
|
) |
| |
|
protected |
◆ CHATROOM_CLIENT_CONFIG_FILENAME
const ilChatroomConfigFileHandler::CHATROOM_CLIENT_CONFIG_FILENAME = 'client.cfg' |
◆ CHATROOM_DATA_DIR
const ilChatroomConfigFileHandler::CHATROOM_DATA_DIR = '/chatroom/' |
◆ CHATROOM_SERVER_CONFIG_FILENAME
const ilChatroomConfigFileHandler::CHATROOM_SERVER_CONFIG_FILENAME = 'server.cfg' |
The documentation for this class was generated from the following file: