You are here

function archiver_get_info in Drupal 7

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 includes/common.inc
Creates the appropriate archiver for the specified file.
archiver_get_extensions in includes/common.inc
Returns a string of supported archive extensions.

File

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