You are here

function remote_stream_wrapper_requirements in Remote Stream Wrapper 8

Implements hook_requirements().

File

./remote_stream_wrapper.install, line 11
Install, update and uninstall functions for the remote_stream_wrapper module.

Code

function remote_stream_wrapper_requirements() {
  $has_curl = function_exists('curl_init');
  $requirements = [];
  $requirements['curl'] = [
    'title' => t('cURL'),
    'value' => $has_curl ? t('Enabled') : t('Not found'),
  ];
  if (!$has_curl) {
    $requirements['curl']['severity'] = REQUIREMENT_ERROR;
    $requirements['curl']['description'] = t('The Remote Stream Wrapper module could not be installed because the PHP <a href="http://php.net/manual/curl.setup.php">cURL</a> library is not available.');
  }
  return $requirements;
}