/** * SupportedFormats * * Gets the supported formats for the archiver * * @access public * @static * @return array array of formats mapped to extensions */ public static function SupportedFormats() { $formats = array(); $formats[GITPHP_COMPRESS_TAR] = GitPHP_Archive::FormatToExtension(GITPHP_COMPRESS_TAR); // TODO check for git > 1.4.3 for zip $formats[GITPHP_COMPRESS_ZIP] = GitPHP_Archive::FormatToExtension(GITPHP_COMPRESS_ZIP); if (function_exists('bzcompress')) { $formats[GITPHP_COMPRESS_BZ2] = GitPHP_Archive::FormatToExtension(GITPHP_COMPRESS_BZ2); } if (function_exists('gzencode')) { $formats[GITPHP_COMPRESS_GZ] = GitPHP_Archive::FormatToExtension(GITPHP_COMPRESS_GZ); } return $formats; }