You are here

function clamav_scheme_options in ClamAV 7

Provide an array of checkbox options for all stream wrappers.

Parameters

string $type: Type of schemes; either 'local' or 'remote'.

Return value

Associative array of options to display keyed by scheme names.

1 call to clamav_scheme_options()
clamav_admin_settings in ./clamav.admin.inc
Admin settings page for ClamAV

File

./clamav.admin.inc, line 215
Admin-pages for managing the ClamAV module.

Code

function clamav_scheme_options($type) {
  switch ($type) {
    case 'local':
      $schemes = array_keys(file_get_stream_wrappers(STREAM_WRAPPERS_LOCAL));
      break;
    case 'remote':
      $schemes = clamav_get_remote_schemes();
      break;
    default:
      $schemes = array();
  }
  $options = array();
  foreach ($schemes as $scheme) {
    $options[$scheme] = $scheme . '://';
  }
  return $options;
}