From 0c1a32224cfe605e40b81a38baba108382a39778 Mon Sep 17 00:00:00 2001 From: Tac Tacelosky Date: Fri, 6 May 2022 08:19:49 -0400 Subject: [PATCH] Usage example for v3 --- readme.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index ff3717b..eb052b6 100644 --- a/readme.md +++ b/readme.md @@ -19,7 +19,13 @@ composer require league/flysystem-ziparchive ```php use League\Flysystem\Filesystem; -use League\Flysystem\ZipArchive\ZipArchiveAdapter as Adapter; +use League\Flysystem\ZipArchive\ZipArchiveAdapter; +use League\Flysystem\ZipArchive\FilesystemZipArchiveProvider; -$filesystem = new Filesystem(new Adapter(__DIR__.'/path/to/archive.zip')); +$zipFile = __DIR__.'/path/to/archive.zip'; +$filesystem = new Filesystem( + new ZipArchiveAdapter( + new FilesystemZipArchiveProvider($zipFile) + ) +); ```