ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilRpcIniFileWriter Class Reference

Creates a java server ini file for the current client More...

+ Collaboration diagram for ilRpcIniFileWriter:

Public Member Functions

 __construct ()
 
 write ()
 
 getIniString ()
 
 getHost ()
 
 setHost (string $host)
 
 getIndexPath ()
 
 setIndexPath (string $indexPath)
 
 getLogLevel ()
 
 setLogLevel (string $logLevel)
 
 getLogPath ()
 
 setLogPath (string $logPath)
 
 getNumThreads ()
 
 setNumThreads (int $numThreads)
 
 getPort ()
 
 setPort (int $port)
 
 setMaxFileSize (string $a_fs)
 
 getMaxFileSize ()
 

Protected Attributes

string $ini = ''
 
string $host = ''
 
int $port = 0
 
string $indexPath = ''
 
string $logPath = ''
 
string $logLevel = ''
 
int $numThreads = 0
 
string $max_file_size = ''
 
ilSetting $settings
 
ilIniFile $inifile
 

Detailed Description

Creates a java server ini file for the current client

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

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

Constructor & Destructor Documentation

◆ __construct()

ilRpcIniFileWriter::__construct ( )

Definition at line 45 of file class.ilRpcIniFileWriter.php.

References $DIC, and ILIAS\Repository\settings().

46  {
47  global $DIC;
48  $this->settings = $DIC->settings();
49  $this->inifile = $DIC['ilIliasIniFile'];
50  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ getHost()

ilRpcIniFileWriter::getHost ( )

Definition at line 83 of file class.ilRpcIniFileWriter.php.

References $host.

Referenced by write().

83  : string
84  {
85  return $this->host;
86  }
+ Here is the caller graph for this function:

◆ getIndexPath()

ilRpcIniFileWriter::getIndexPath ( )

Definition at line 93 of file class.ilRpcIniFileWriter.php.

References $indexPath.

Referenced by write().

93  : string
94  {
95  return $this->indexPath;
96  }
+ Here is the caller graph for this function:

◆ getIniString()

ilRpcIniFileWriter::getIniString ( )

Definition at line 78 of file class.ilRpcIniFileWriter.php.

References $ini.

78  : string
79  {
80  return $this->ini;
81  }

◆ getLogLevel()

ilRpcIniFileWriter::getLogLevel ( )

Definition at line 103 of file class.ilRpcIniFileWriter.php.

References $logLevel.

Referenced by write().

103  : string
104  {
105  return $this->logLevel;
106  }
+ Here is the caller graph for this function:

◆ getLogPath()

ilRpcIniFileWriter::getLogPath ( )

Definition at line 113 of file class.ilRpcIniFileWriter.php.

References $logPath.

Referenced by write().

113  : string
114  {
115  return $this->logPath;
116  }
+ Here is the caller graph for this function:

◆ getMaxFileSize()

ilRpcIniFileWriter::getMaxFileSize ( )

Definition at line 148 of file class.ilRpcIniFileWriter.php.

References $max_file_size.

Referenced by write().

148  : string
149  {
150  return $this->max_file_size;
151  }
+ Here is the caller graph for this function:

◆ getNumThreads()

ilRpcIniFileWriter::getNumThreads ( )

Definition at line 123 of file class.ilRpcIniFileWriter.php.

References $numThreads.

Referenced by write().

123  : int
124  {
125  return $this->numThreads;
126  }
+ Here is the caller graph for this function:

◆ getPort()

ilRpcIniFileWriter::getPort ( )

Definition at line 133 of file class.ilRpcIniFileWriter.php.

References $port.

Referenced by write().

133  : int
134  {
135  return $this->port;
136  }
+ Here is the caller graph for this function:

◆ setHost()

ilRpcIniFileWriter::setHost ( string  $host)

Definition at line 88 of file class.ilRpcIniFileWriter.php.

References $host.

88  : void
89  {
90  $this->host = $host;
91  }

◆ setIndexPath()

ilRpcIniFileWriter::setIndexPath ( string  $indexPath)

Definition at line 98 of file class.ilRpcIniFileWriter.php.

References $indexPath.

98  : void
99  {
100  $this->indexPath = $indexPath;
101  }

◆ setLogLevel()

ilRpcIniFileWriter::setLogLevel ( string  $logLevel)

Definition at line 108 of file class.ilRpcIniFileWriter.php.

References $logLevel.

108  : void
109  {
110  $this->logLevel = $logLevel;
111  }

◆ setLogPath()

ilRpcIniFileWriter::setLogPath ( string  $logPath)

Definition at line 118 of file class.ilRpcIniFileWriter.php.

References $logPath.

118  : void
119  {
120  $this->logPath = $logPath;
121  }

◆ setMaxFileSize()

ilRpcIniFileWriter::setMaxFileSize ( string  $a_fs)

Definition at line 143 of file class.ilRpcIniFileWriter.php.

143  : void
144  {
145  $this->max_file_size = $a_fs;
146  }

◆ setNumThreads()

ilRpcIniFileWriter::setNumThreads ( int  $numThreads)

Definition at line 128 of file class.ilRpcIniFileWriter.php.

References $numThreads.

128  : void
129  {
130  $this->numThreads = $numThreads;
131  }

◆ setPort()

ilRpcIniFileWriter::setPort ( int  $port)

Definition at line 138 of file class.ilRpcIniFileWriter.php.

References $port.

138  : void
139  {
140  $this->port = $port;
141  }

◆ write()

ilRpcIniFileWriter::write ( )

Definition at line 52 of file class.ilRpcIniFileWriter.php.

References CLIENT_ID, getHost(), getIndexPath(), getLogLevel(), getLogPath(), getMaxFileSize(), getNumThreads(), getPort(), and ILIAS\Repository\settings().

52  : bool
53  {
54  // Main section
55  $this->ini = "[Server]\n";
56  $this->ini .= "IpAddress = " . $this->getHost() . "\n";
57  $this->ini .= "Port = " . $this->getPort() . "\n";
58  $this->ini .= "IndexPath = " . $this->getIndexPath() . "\n";
59  $this->ini .= "LogFile = " . $this->getLogPath() . "\n";
60  $this->ini .= "LogLevel = " . $this->getLogLevel() . "\n";
61  $this->ini .= "NumThreads = " . $this->getNumThreads() . "\n";
62  $this->ini .= "RamBufferSize = 256\n";
63  $this->ini .= "IndexMaxFileSizeMB = " . $this->getMaxFileSize() . "\n";
64 
65  $this->ini .= "\n";
66 
67  $this->ini .= "[Client1]\n";
68  $this->ini .= "ClientId = " . CLIENT_ID . "\n";
69  $this->ini .= "NicId = " . $this->settings->get('inst_id', '0') . "\n";
70  $this->ini .= "IliasIniPath = " . $this->inifile->readVariable(
71  'server',
72  'absolute_path'
73  ) . DIRECTORY_SEPARATOR . "ilias.ini.php\n";
74 
75  return true;
76  }
const CLIENT_ID
Definition: constants.php:41
+ Here is the call graph for this function:

Field Documentation

◆ $host

string ilRpcIniFileWriter::$host = ''
protected

Definition at line 34 of file class.ilRpcIniFileWriter.php.

Referenced by getHost(), and setHost().

◆ $indexPath

string ilRpcIniFileWriter::$indexPath = ''
protected

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

Referenced by getIndexPath(), and setIndexPath().

◆ $ini

string ilRpcIniFileWriter::$ini = ''
protected

Definition at line 32 of file class.ilRpcIniFileWriter.php.

Referenced by getIniString().

◆ $inifile

ilIniFile ilRpcIniFileWriter::$inifile
protected

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

◆ $logLevel

string ilRpcIniFileWriter::$logLevel = ''
protected

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

Referenced by getLogLevel(), and setLogLevel().

◆ $logPath

string ilRpcIniFileWriter::$logPath = ''
protected

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

Referenced by getLogPath(), and setLogPath().

◆ $max_file_size

string ilRpcIniFileWriter::$max_file_size = ''
protected

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

Referenced by getMaxFileSize().

◆ $numThreads

int ilRpcIniFileWriter::$numThreads = 0
protected

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

Referenced by getNumThreads(), and setNumThreads().

◆ $port

int ilRpcIniFileWriter::$port = 0
protected

Definition at line 35 of file class.ilRpcIniFileWriter.php.

Referenced by getPort(), and setPort().

◆ $settings

ilSetting ilRpcIniFileWriter::$settings
protected

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


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