7.x common.inc archiver_get_info()

Retrieves a list of all available archivers.

See also

hook_archiver_info()

hook_archiver_info_alter()

1 call to archiver_get_info()
archiver_get_archiver in includes/common.inc
Creates the appropriate archiver for the specified file.

File

includes/common.inc, line 8359
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;
}