You are here

class Config in ClamAV 8

Same name and namespace in other branches
  1. 2.x src/Config.php \Drupal\clamav\Config

Hierarchy

Expanded class hierarchy of Config

7 files declare their use of Config
clamav.install in ./clamav.install
Install, update and uninstall functions for the clamav module.
ClamAVConfigForm.php in src/Form/ClamAVConfigForm.php
DaemonTCPIP.php in src/Scanner/DaemonTCPIP.php
DaemonUnixSocket.php in src/Scanner/DaemonUnixSocket.php
Executable.php in src/Scanner/Executable.php

... See full list

1 string reference to 'Config'
clamav.services.yml in ./clamav.services.yml
clamav.services.yml
1 service uses Config
clamav_config in ./clamav.services.yml
Drupal\clamav\Config

File

src/Config.php, line 6

Namespace

Drupal\clamav
View source
class Config {
  const MODE_DAEMON = 0;
  const MODE_EXECUTABLE = 1;
  const MODE_UNIX_SOCKET = 2;
  const OUTAGE_BLOCK_UNCHECKED = 0;
  const OUTAGE_ALLOW_UNCHECKED = 1;

  // Drupal read-only config object.
  protected $_config;

  /**
   * Constructor.
   *
   * Load the config from Drupal's CMI.
   */
  public function __construct() {
    $this->_config = \Drupal::config('clamav.settings');
  }

  // Global config options:
  public function enabled() {
    return $this->_config
      ->get('enabled');
  }
  public function scan_mode() {
    return $this->_config
      ->get('scan_mode');
  }
  public function outage_action() {
    return $this->_config
      ->get('outage_action');
  }
  public function verbosity() {
    return $this->_config
      ->get('verbosity');
  }
  public function get($name) {
    return $this->_config
      ->get($name);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Config::$_config protected property
Config::enabled public function
Config::get public function
Config::MODE_DAEMON constant
Config::MODE_EXECUTABLE constant
Config::MODE_UNIX_SOCKET constant
Config::outage_action public function
Config::OUTAGE_ALLOW_UNCHECKED constant
Config::OUTAGE_BLOCK_UNCHECKED constant
Config::scan_mode public function
Config::verbosity public function
Config::__construct public function Constructor.