ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilVirusScannerConfigStoredObjective Class Reference
+ Inheritance diagram for ilVirusScannerConfigStoredObjective:
+ Collaboration diagram for ilVirusScannerConfigStoredObjective:

Public Member Functions

 __construct (\ilVirusScannerSetupConfig $config)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 

Protected Attributes

 $config
 

Detailed Description

Definition at line 7 of file class.ilVirusScannerConfigStoredObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilVirusScannerConfigStoredObjective::__construct ( \ilVirusScannerSetupConfig  $config)

Member Function Documentation

◆ achieve()

ilVirusScannerConfigStoredObjective::achieve ( Setup\Environment  $environment)

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

References $ini.

43  : Setup\Environment
44  {
45  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
46 
47  $ini->setVariable("tools", "vscantype", $this->config->getVirusScanner());
48  $ini->setVariable("tools", "scancommand", $this->config->getPathToScan());
49  $ini->setVariable("tools", "cleancommand", $this->config->getPathToClean());
50 
51  if (!$ini->write()) {
52  throw new Setup\UnachievableException("Could not write ilias.ini.php");
53  }
54 
55  return $environment;
56  }
$ini
Definition: raiseError.php:4

◆ getHash()

ilVirusScannerConfigStoredObjective::getHash ( )

Definition at line 20 of file class.ilVirusScannerConfigStoredObjective.php.

20  : string
21  {
22  return hash("sha256", self::class);
23  }

◆ getLabel()

ilVirusScannerConfigStoredObjective::getLabel ( )

Definition at line 25 of file class.ilVirusScannerConfigStoredObjective.php.

25  : string
26  {
27  return "Fill ini with settings for Services/VirusScanner";
28  }

◆ getPreconditions()

ilVirusScannerConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

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

35  : array
36  {
37  $common_config = $environment->getConfigFor("common");
38  return [
39  new ilIniFilesPopulatedObjective($common_config)
40  ];
41  }

◆ isNotable()

ilVirusScannerConfigStoredObjective::isNotable ( )

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

30  : bool
31  {
32  return false;
33  }

Field Documentation

◆ $config

ilVirusScannerConfigStoredObjective::$config
protected

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

Referenced by __construct().


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