You are here

public function ClamAVConfigForm::scheme_wrappers_to_scan in ClamAV 8

Same name and namespace in other branches
  1. 2.x src/Form/ClamAVConfigForm.php \Drupal\clamav\Form\ClamAVConfigForm::scheme_wrappers_to_scan()

List the stream-wrapper schemes that are configured to be scannable, according to whether the scheme is local or remote.

Parameters

string $type: Either 'local' (for local stream-wrappers), or 'remote'.

Return value

array Unindexed array of the machine-names of stream-wrappers that should be scanned. For example: array('public', 'private').

1 call to ClamAVConfigForm::scheme_wrappers_to_scan()
ClamAVConfigForm::buildForm in src/Form/ClamAVConfigForm.php
Form constructor.

File

src/Form/ClamAVConfigForm.php, line 297

Class

ClamAVConfigForm
Configure file system settings for this site.

Namespace

Drupal\clamav\Form

Code

public function scheme_wrappers_to_scan($type) {
  switch ($type) {
    case 'local':
      $schemes = array_keys($this
        ->scheme_wrappers_available('local'));
      break;
    case 'remote':
      $schemes = array_keys($this
        ->scheme_wrappers_available('remote'));
      break;
  }
  return array_filter($schemes, array(
    '\\Drupal\\clamav\\Scanner',
    'isSchemeScannable',
  ));
}