ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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.

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

15  {
16  global $DIC;
17 
18  $ilIliasIniFile = $DIC['ilIliasIniFile'];
19  // temporary bugfix for global usage
20  if ($DIC->offsetExists('ini')) {
21  $ini = $DIC['ini'];
22  }
23 
24  $ilClientIniFile = null;
25  if (isset($DIC['ilClientIniFile'])) {
26  $ilClientIniFile = $DIC['ilClientIniFile'];
27  }
28 
29  //realy not nice but necessary to initalize logger at setup
30  //ilias_ini is named only as $ini in inc.setup_header.php
31  if (!$ilIliasIniFile) {
32  if (!$ini) {
33  throw new Exception("No ILIAS ini");
34  } else {
35  $this->ilias_ini = $ini;
36  }
37  } else {
38  $this->ilias_ini = $ilIliasIniFile;
39  }
40 
41  if ($ilClientIniFile !== null) {
42  $this->gClientIniFile = $ilClientIniFile;
43  }
44 
45  $this->folder = null;
46  $this->mail = null;
47 
48  $this->read();
49  }
global $DIC
Definition: saml.php:7
read()
reads the values from ilias.ini.php
$ilIliasIniFile
$ini
Definition: raiseError.php:4
+ Here is the call graph for this function:

Member Function Documentation

◆ folder()

ilLoggingErrorSettings::folder ( )

Definition at line 66 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 51 of file class.ilLoggingErrorSettings.php.

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

52  {
53  return new ilLoggingErrorSettings();
54  }
Settings for the error protcoll system.
+ Here is the caller graph for this function:

◆ mail()

ilLoggingErrorSettings::mail ( )

Definition at line 71 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 79 of file class.ilLoggingErrorSettings.php.

References setFolder(), and setMail().

Referenced by __construct().

80  {
81  $this->setFolder($this->ilias_ini->readVariable("log", "error_path"));
82 
83  if ($this->gClientIniFile instanceof \ilIniFile) {
84  $this->setMail($this->gClientIniFile->readVariable("log", "error_recipient"));
85  }
86  }
INIFile Parser.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFolder()

ilLoggingErrorSettings::setFolder (   $folder)
protected

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

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 61 of file class.ilLoggingErrorSettings.php.

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 91 of file class.ilLoggingErrorSettings.php.

References mail().

92  {
93  if ($this->gClientIniFile instanceof \ilIniFile) {
94  $this->gClientIniFile->addGroup("log");
95  $this->gClientIniFile->setVariable("log", "error_recipient", trim($this->mail()));
96  $this->gClientIniFile->write();
97  }
98  }
INIFile Parser.
+ 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: