<?php

/**
 * @file
 * Install, update, and uninstall functions for the Archibald Export module.
 */

/**
 * Implements hook_requirements().
 */
function archibald_export_requirements($phase) {
  $t = get_t();

  $return = array();

  $return['archibald_export__zip'] = array(
    'title' => $t("Archibald Export: ZIP PHP extension"),
  );
  if (!class_exists('ZipArchive')) {
    $return['archibald_export__zip']['value'] = $t("Missing");
    $return['archibald_export__zip']['description'] = $t("In order to use Archibald Export, you must install the PHP ZipArchive extension");
    $return['archibald_export__zip']['severity'] = REQUIREMENT_ERROR;
  }
  else {
    $return['archibald_export__zip']['value'] = $t("ZipArchive PHP extension is available");
    $return['archibald_export__zip']['severity'] = REQUIREMENT_OK;
  }

  return $return;
}
