ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilVirusScannerSetupAgent Class Reference
+ Inheritance diagram for ilVirusScannerSetupAgent:
+ Collaboration diagram for ilVirusScannerSetupAgent:

Public Member Functions

 __construct (Factory $refinery)
 
 hasConfig ()
 Does this agent require a configuration? More...
 
 getArrayToConfigTransformation ()
 Agents must be able to tell how to create a configuration from a nested array. More...
 
 getInstallObjective (?Setup\Config $config=null)
 
 getUpdateObjective (?Setup\Config $config=null)
 
 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts. More...
 
 getStatusObjective (?Setup\Metrics\Storage $storage)
 
 getMigrations ()
 Get a named map of migrations available for this Agent. More...
 
- Public Member Functions inherited from ILIAS\Setup\Agent
 getInstallObjective (?Config $config=null)
 Get the goals the agent wants to achieve on setup. More...
 
 getUpdateObjective (?Config $config=null)
 Get the goal the agent wants to achieve on update. More...
 
 getStatusObjective (Metrics\Storage $storage)
 Get the objective to be achieved when status is requested. More...
 
 getNamedObjectives (?Config $config=null)
 Gets all named objectives The keys of the returned array are the commands. More...
 

Protected Attributes

Factory $refinery
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilVirusScannerSetupAgent::__construct ( Factory  $refinery)

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

References $refinery, and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

Member Function Documentation

◆ getArrayToConfigTransformation()

ilVirusScannerSetupAgent::getArrayToConfigTransformation ( )

Agents must be able to tell how to create a configuration from a nested array.

Exceptions
LogicExceptionif Agent has no Config

Implements ILIAS\Setup\Agent.

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

References $data, null, ILIAS\Repository\refinery(), and ilVirusScannerSetupConfig\VIRUS_SCANNER_NONE.

42  : Refinery\Transformation
43  {
44  return $this->refinery->custom()->transformation(fn($data): ilVirusScannerSetupConfig => new ilVirusScannerSetupConfig(
46  $data['path_to_scan'] ?? null,
47  $data['path_to_clean'] ?? null,
48  $data['icap_host'] ?? null,
49  $data['icap_port'] ?? null,
50  $data['icap_service_name'] ?? null,
51  $data['icap_client_path'] ?? null,
52  ));
53  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ getBuildObjective()

ilVirusScannerSetupAgent::getBuildObjective ( )

Get the goal the agent wants to achieve to build artifacts.

Exceptions
InvalidArgumentExceptionif Config does not match the Agent.

Implements ILIAS\Setup\Agent.

Definition at line 69 of file class.ilVirusScannerSetupAgent.php.

69  : Setup\Objective
70  {
71  return new Setup\Objective\NullObjective();
72  }

◆ getInstallObjective()

ilVirusScannerSetupAgent::getInstallObjective ( ?Setup\Config  $config = null)

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

◆ getMigrations()

ilVirusScannerSetupAgent::getMigrations ( )

Get a named map of migrations available for this Agent.

Should also return Migrations that have run completely.

Returns
array<string,Migration>|Migration[]

Implements ILIAS\Setup\Agent.

Definition at line 79 of file class.ilVirusScannerSetupAgent.php.

79  : array
80  {
81  return [];
82  }

◆ getStatusObjective()

ilVirusScannerSetupAgent::getStatusObjective ( ?Setup\Metrics\Storage  $storage)

◆ getUpdateObjective()

ilVirusScannerSetupAgent::getUpdateObjective ( ?Setup\Config  $config = null)

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

References null.

60  : Setup\Objective
61  {
62  if ($config !== null) {
63  return new ilVirusScannerConfigStoredObjective($config);
64  }
65 
66  return new Setup\Objective\NullObjective();
67  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ hasConfig()

ilVirusScannerSetupAgent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

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

37  : bool
38  {
39  return true;
40  }

Field Documentation

◆ $refinery

Factory ilVirusScannerSetupAgent::$refinery
protected

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

Referenced by __construct().


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