ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 24 of file class.ilRpcIniFileWriter.php.

Constructor & Destructor Documentation

◆ __construct()

ilRpcIniFileWriter::__construct ( )

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

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

40  {
41  global $DIC;
42  $this->settings = $DIC->settings();
43  $this->inifile = $DIC['ilIliasIniFile'];
44  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ getHost()

ilRpcIniFileWriter::getHost ( )

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

References $host.

Referenced by write().

77  : string
78  {
79  return $this->host;
80  }
+ Here is the caller graph for this function:

◆ getIndexPath()

ilRpcIniFileWriter::getIndexPath ( )

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

References $indexPath.

Referenced by write().

87  : string
88  {
89  return $this->indexPath;
90  }
+ Here is the caller graph for this function:

◆ getIniString()

ilRpcIniFileWriter::getIniString ( )

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

References $ini.

72  : string
73  {
74  return $this->ini;
75  }

◆ getLogLevel()

ilRpcIniFileWriter::getLogLevel ( )

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

References $logLevel.

Referenced by write().

97  : string
98  {
99  return $this->logLevel;
100  }
+ Here is the caller graph for this function:

◆ getLogPath()

ilRpcIniFileWriter::getLogPath ( )

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

References $logPath.

Referenced by write().

107  : string
108  {
109  return $this->logPath;
110  }
+ Here is the caller graph for this function:

◆ getMaxFileSize()

ilRpcIniFileWriter::getMaxFileSize ( )

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

References $max_file_size.

Referenced by write().

142  : string
143  {
144  return $this->max_file_size;
145  }
+ Here is the caller graph for this function:

◆ getNumThreads()

ilRpcIniFileWriter::getNumThreads ( )

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

References $numThreads.

Referenced by write().

117  : int
118  {
119  return $this->numThreads;
120  }
+ Here is the caller graph for this function:

◆ getPort()

ilRpcIniFileWriter::getPort ( )

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

References $port.

Referenced by write().

127  : int
128  {
129  return $this->port;
130  }
+ Here is the caller graph for this function:

◆ setHost()

ilRpcIniFileWriter::setHost ( string  $host)

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

References $host.

82  : void
83  {
84  $this->host = $host;
85  }

◆ setIndexPath()

ilRpcIniFileWriter::setIndexPath ( string  $indexPath)

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

References $indexPath.

92  : void
93  {
94  $this->indexPath = $indexPath;
95  }

◆ setLogLevel()

ilRpcIniFileWriter::setLogLevel ( string  $logLevel)

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

References $logLevel.

102  : void
103  {
104  $this->logLevel = $logLevel;
105  }

◆ setLogPath()

ilRpcIniFileWriter::setLogPath ( string  $logPath)

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

References $logPath.

112  : void
113  {
114  $this->logPath = $logPath;
115  }

◆ setMaxFileSize()

ilRpcIniFileWriter::setMaxFileSize ( string  $a_fs)

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

137  : void
138  {
139  $this->max_file_size = $a_fs;
140  }

◆ setNumThreads()

ilRpcIniFileWriter::setNumThreads ( int  $numThreads)

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

References $numThreads.

122  : void
123  {
124  $this->numThreads = $numThreads;
125  }

◆ setPort()

ilRpcIniFileWriter::setPort ( int  $port)

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

References $port.

132  : void
133  {
134  $this->port = $port;
135  }

◆ write()

ilRpcIniFileWriter::write ( )

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

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

46  : bool
47  {
48  // Main section
49  $this->ini = "[Server]\n";
50  $this->ini .= "IpAddress = " . $this->getHost() . "\n";
51  $this->ini .= "Port = " . $this->getPort() . "\n";
52  $this->ini .= "IndexPath = " . $this->getIndexPath() . "\n";
53  $this->ini .= "LogFile = " . $this->getLogPath() . "\n";
54  $this->ini .= "LogLevel = " . $this->getLogLevel() . "\n";
55  $this->ini .= "NumThreads = " . $this->getNumThreads() . "\n";
56  $this->ini .= "RamBufferSize = 256\n";
57  $this->ini .= "IndexMaxFileSizeMB = " . $this->getMaxFileSize() . "\n";
58 
59  $this->ini .= "\n";
60 
61  $this->ini .= "[Client1]\n";
62  $this->ini .= "ClientId = " . CLIENT_ID . "\n";
63  $this->ini .= "NicId = " . $this->settings->get('inst_id', '0') . "\n";
64  $this->ini .= "IliasIniPath = " . $this->inifile->readVariable(
65  'server',
66  'absolute_path'
67  ) . DIRECTORY_SEPARATOR . "ilias.ini.php\n";
68 
69  return true;
70  }
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 28 of file class.ilRpcIniFileWriter.php.

Referenced by getHost(), and setHost().

◆ $indexPath

string ilRpcIniFileWriter::$indexPath = ''
protected

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

Referenced by getIndexPath(), and setIndexPath().

◆ $ini

string ilRpcIniFileWriter::$ini = ''
protected

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

Referenced by getIniString().

◆ $inifile

ilIniFile ilRpcIniFileWriter::$inifile
protected

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

◆ $logLevel

string ilRpcIniFileWriter::$logLevel = ''
protected

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

Referenced by getLogLevel(), and setLogLevel().

◆ $logPath

string ilRpcIniFileWriter::$logPath = ''
protected

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

Referenced by getLogPath(), and setLogPath().

◆ $max_file_size

string ilRpcIniFileWriter::$max_file_size = ''
protected

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

Referenced by getMaxFileSize().

◆ $numThreads

int ilRpcIniFileWriter::$numThreads = 0
protected

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

Referenced by getNumThreads(), and setNumThreads().

◆ $port

int ilRpcIniFileWriter::$port = 0
protected

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

Referenced by getPort(), and setPort().

◆ $settings

ilSetting ilRpcIniFileWriter::$settings
protected

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


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