function archiver_get_info

7.x common.inc archiver_get_info()

Retrieves a list of all available archivers.

See also

hook_archiver_info()

hook_archiver_info_alter()

2 calls to archiver_get_info()
archiver_get_archiver in drupal/includes/common.inc
Creates the appropriate archiver for the specified file.
archiver_get_extensions in drupal/includes/common.inc
Returns a string of supported archive extensions.

File

drupal/includes/common.inc, line 8190
Common functions that many Drupal modules will need to reference.

Code

function archiver_get_info() {
  $archiver_info = &drupal_static(__FUNCTION__, array());

  if (empty($archiver_info)) {
    $cache = cache_get('archiver_info');
    if ($cache === FALSE) {
      // Rebuild the cache and save it.
      $archiver_info = module_invoke_all('archiver_info');
      drupal_alter('archiver_info', $archiver_info);
      uasort($archiver_info, 'drupal_sort_weight');
      cache_set('archiver_info', $archiver_info);
    }
    else {
      $archiver_info = $cache->data;
    }
  }

  return $archiver_info;
}