You are here

remote_stream_wrapper.install in Remote Stream Wrapper 8

Install, update and uninstall functions for the remote_stream_wrapper module.

File

remote_stream_wrapper.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the remote_stream_wrapper module.
 */

/**
 * Implements hook_requirements().
 */
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;
}

Functions