summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--composer.json8
-rw-r--r--src/ZipStream.php7
2 files changed, 11 insertions, 4 deletions
diff --git a/composer.json b/composer.json
index 73d2df7..67e2d06 100644
--- a/composer.json
+++ b/composer.json
@@ -20,10 +20,14 @@
},
"autoload": {
- "Pablotron\\ZipStream\\": "src/"
+ "psr-4": {
+ "Pablotron\\ZipStream\\": "src/"
+ }
},
"autoload-dev": {
- "Pablotron\\ZipStream\\Tests\\": "tests/"
+ "psr-4": {
+ "Pablotron\\ZipStream\\Tests\\": "tests/"
+ }
}
}
diff --git a/src/ZipStream.php b/src/ZipStream.php
index b3f41dd..b545bab 100644
--- a/src/ZipStream.php
+++ b/src/ZipStream.php
@@ -1,7 +1,7 @@
<?php
declare(strict_types = 1);
/**
- * Streamed, dynamically generated zip archives.
+ * Dynamically generate streamed zip archives.
*
* @author Paul Duncan <pabs@pablotron.org>
* @copyright 2007-2018 Paul Duncan <pabs@pablotron.org>
@@ -1090,7 +1090,7 @@ final class Entry {
};
/**
- * Dynamically generate streamed zip file.
+ * Dynamically generate streamed zip archives.
*
* @api
*
@@ -1149,7 +1149,10 @@ final class ZipStream {
*/
public function __construct(string $name, array $args = []) {
try {
+ # set state
$this->state = self::STREAM_STATE_INIT;
+
+ # set name and args
$this->name = $name;
$this->args = array_merge(self::$ARCHIVE_DEFAULTS, [
'time' => time(),