From c082826d32c04302edde80f2af0214891c01e1de Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 12 Jul 2017 11:42:41 +0200 Subject: [PATCH] Create ArchiveInterface.php --- Utils/IO/Zip/ArchiveInterface.php | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Utils/IO/Zip/ArchiveInterface.php diff --git a/Utils/IO/Zip/ArchiveInterface.php b/Utils/IO/Zip/ArchiveInterface.php new file mode 100644 index 000000000..ebfdc544a --- /dev/null +++ b/Utils/IO/Zip/ArchiveInterface.php @@ -0,0 +1,57 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +declare(strict_types=1); +namespace phpOMS\Utils\IO\Zip; +/** + * Archive interface + * + * @category Framework + * @package phpOMS\Utils\IO + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +interface ArchiveInterface +{ + /** + * Create archive. + * + * @param string[] $sources Files and directories to compress + * @param string $destination Output destination + * @param bool $overwrite Overwrite if destination is existing + * + * @return bool + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public static function pack(array $sources, string $destination, bool $overwrite = true) : bool + + /** + * Unpack archive. + * + * @param string $source File to decompress + * @param string $destination Output destination + * + * @return bool + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public static function unpack(string $source, string $destination) : bool; +}