ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLoggingErrorSettings Class Reference

Settings for the error protcoll system. More...

+ Collaboration diagram for ilLoggingErrorSettings:

Public Member Functions

 setMail ($mail)
 
 folder ()
 
 mail ()
 
 update ()
 writes mail recipient into client.ini.php More...
 

Static Public Member Functions

static getInstance ()
 

Protected Member Functions

 __construct ()
 
 setFolder ($folder)
 
 read ()
 reads the values from ilias.ini.php More...
 

Protected Attributes

 $folder
 
 $mail
 

Detailed Description

Settings for the error protcoll system.

Author
Stefan Hecken stefa.nosp@m.n.he.nosp@m.cken@.nosp@m.conc.nosp@m.epts-.nosp@m.and-.nosp@m.train.nosp@m.ing..nosp@m.de

Definition at line 9 of file class.ilLoggingErrorSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilLoggingErrorSettings::__construct ( )
protected

Definition at line 14 of file class.ilLoggingErrorSettings.php.

15 {
16 global $ilIliasIniFile, $ini, $ilClientIniFile;
17
18 //realy not nice but necessary to initalize logger at setup
19 //ilias_ini is named only as $ini in inc.setup_header.php
20 if (!$ilIliasIniFile) {
21 if (!$ini) {
22 throw new Exception("No ILIAS ini");
23 } else {
24 $this->ilias_ini = $ini;
25 }
26 } else {
27 $this->ilias_ini = $ilIliasIniFile;
28 }
29
30 if ($ilClientIniFile !== null) {
31 $this->gClientIniFile = $ilClientIniFile;
32 }
33
34 $this->folder = null;
35 $this->mail = null;
36
37 $this->read();
38 }
read()
reads the values from ilias.ini.php
$ini
Definition: raiseError.php:4
$ilIliasIniFile

References $ilIliasIniFile, $ini, folder(), mail(), and read().

+ Here is the call graph for this function:

Member Function Documentation

◆ folder()

ilLoggingErrorSettings::folder ( )

Definition at line 55 of file class.ilLoggingErrorSettings.php.

References $folder.

Referenced by __construct(), and setFolder().

+ Here is the caller graph for this function:

◆ getInstance()

static ilLoggingErrorSettings::getInstance ( )
static

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

41 {
42 return new ilLoggingErrorSettings();
43 }
Settings for the error protcoll system.

Referenced by ilLoggerCronCleanErrorFiles\__construct(), ilErrorHandling\defaultHandler(), and ilObjLoggingSettingsGUI\initErrorSettings().

+ Here is the caller graph for this function:

◆ mail()

ilLoggingErrorSettings::mail ( )

Definition at line 60 of file class.ilLoggingErrorSettings.php.

References $mail.

Referenced by __construct(), setMail(), and update().

+ Here is the caller graph for this function:

◆ read()

ilLoggingErrorSettings::read ( )
protected

reads the values from ilias.ini.php

Definition at line 68 of file class.ilLoggingErrorSettings.php.

69 {
70 $this->setFolder($this->ilias_ini->readVariable("log", "error_path"));
71
72 if ($this->gClientIniFile instanceof \ilIniFile) {
73 $this->setMail($this->gClientIniFile->readVariable("log", "error_recipient"));
74 }
75 }
INIFile Parser.

References setFolder(), and setMail().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFolder()

ilLoggingErrorSettings::setFolder (   $folder)
protected

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

46 {
47 $this->folder = $folder;
48 }

References $folder, and folder().

Referenced by read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMail()

ilLoggingErrorSettings::setMail (   $mail)

Definition at line 50 of file class.ilLoggingErrorSettings.php.

51 {
52 $this->mail = $mail;
53 }

References $mail, and mail().

Referenced by read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilLoggingErrorSettings::update ( )

writes mail recipient into client.ini.php

Definition at line 80 of file class.ilLoggingErrorSettings.php.

81 {
82 if ($this->gClientIniFile instanceof \ilIniFile) {
83 $this->gClientIniFile->addGroup("log");
84 $this->gClientIniFile->setVariable("log", "error_recipient", trim($this->mail()));
85 $this->gClientIniFile->write();
86 }
87 }

References mail().

+ Here is the call graph for this function:

Field Documentation

◆ $folder

ilLoggingErrorSettings::$folder
protected

Definition at line 11 of file class.ilLoggingErrorSettings.php.

Referenced by folder(), and setFolder().

◆ $mail

ilLoggingErrorSettings::$mail
protected

Definition at line 12 of file class.ilLoggingErrorSettings.php.

Referenced by mail(), and setMail().


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