1 common.inc archiver_get_info()

Retrieves a list of all available archivers.

See also

hook_archiver_info()

hook_archiver_info_alter()

File

core/includes/common.inc, line 9016
Common functions that many Backdrop modules will need to reference.

Code

function archiver_get_info() {
  $archiver_info = &backdrop_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');
      backdrop_alter('archiver_info', $archiver_info);
      backdrop_sort($archiver_info);
      cache()->set('archiver_info', $archiver_info);
    }
    else {
      $archiver_info = $cache->data;
    }
  }

  return $archiver_info;
}