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

File

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