Download the PHP package ssitu/barnett without Composer
On this page you can find all versions of the php package ssitu/barnett. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ssitu/barnett
More information about ssitu/barnett
Files in ssitu/barnett
Informations about the package barnett
Barnett
/!\ BETA STAGE
A Php zip utility.
Makes your life easier.
Zips as good as Barnett Newman's.
Overview
Set archive destination, source directory and voilà.
-
Yes, source directory will be crawled recursively.
- Neat archive tree, mirroring source's one.
- With the option to set a list of excluded files.
- Can also target only some file extensions.
-
All necessary checks are performed.
- Errors will be logged.
- Yes, you can plug in your Psr-3 logger of choice.
- Or just access in-memory logs.
-
An existing archive will not be overwritten.
- Well, unless specified.
- Zip filename can be handled for you.
- Addition of a timestamp on request.
- Comes with finishing moves.
- Can delete successfully zipped source files.
- Provide feedback on zipped and shred files.
- Oh, and produce an html download link.
Call with Style
- Barnett's methods can be chained.
- Since it extends ZipArchive, you can call native methods too.
- No private thingies, so you can extend it too.
Install
Will also require SSITU/Blueprints
FlexLogsTrait
andFlexLogsInterface
specifically.
This is a Psr-3 "logger aware" implementation with a fallback.
If no use of other SSITU blueprints, you can download just those two files.
How to
Init
Log System
Simple Bundle
Return zip file's path on success.
Chaining
Example:
Note
Setting an alias path forgetDownloadLink()
is not mandatory, but highly recommended.
Otherwise, your server's file tree could be exposed to the world.
À la carte
Chainable Actions
About $omitThesePaths
:
-
Specified paths can be relative to
$sourceDirPath
.
example:someFolder/someFile.ext
instead of:Source/Dir/Path/someFolder/someFile.ext
- To exclude a whole subfolder and its all content, only the subfolder path is required.
example :['dontTouchMe/']
instead of:['dontTouchMe/','dontTouchMe/file1.ext','dontTouchMe/file2.ext']
Chainable Resetters
Getters
Assistant's Static Methods
For documentation's sake.
Contributing
Sure! :raised_hands: You can take a loot at CONTRIBUTING.
License
This project is under the MIT License; cf. LICENSE for details.
Final Words
This is the plasmic zip. Now go do something else.