src/File.php
public static function zip($sourcePath, string $outZipPath): void
	{
		$zipFile = new ZipArchive();
		$zipFile->open($outZipPath, ZipArchive::CREATE);

		if (is_array($sourcePath)) {
			foreach ($sourcePath as $source) {
				self::addToZip((string) $source, $zipFile);
			}
		} else {
			self::addToZip((string) $sourcePath, $zipFile);
		}

		$zipFile->close();
	}
public static function zip($sourcePath, string $outZipPath): void
	{
		$zipFile = new ZipArchive();
		$zipFile->open($outZipPath, ZipArchive::CREATE);

		if (is_array($sourcePath)) {
			foreach ($sourcePath as $source) {
				self::addToZip((string) $source, $zipFile);
			}
		} else {
			self::addToZip((string) $sourcePath, $zipFile);
		}

		$zipFile->close();
	}
Zazipuje soubor/y nebo adresar|e

@param string|array $sourcePath cesta k adresari k archivaci
@param string $outZipPath cesta k vystupnimu souboru zip