Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CarnetApp/CarnetNextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/nelexa/zip/src/PhpZip/Model/Entry/ZipChangesEntry.php')
-rw-r--r--vendor/nelexa/zip/src/PhpZip/Model/Entry/ZipChangesEntry.php63
1 files changed, 63 insertions, 0 deletions
diff --git a/vendor/nelexa/zip/src/PhpZip/Model/Entry/ZipChangesEntry.php b/vendor/nelexa/zip/src/PhpZip/Model/Entry/ZipChangesEntry.php
new file mode 100644
index 0000000..205a793
--- /dev/null
+++ b/vendor/nelexa/zip/src/PhpZip/Model/Entry/ZipChangesEntry.php
@@ -0,0 +1,63 @@
+<?php
+
+namespace PhpZip\Model\Entry;
+
+use PhpZip\Exception\ZipException;
+
+/**
+ * Source Entry Changes
+ *
+ * @author Ne-Lexa alexey@nelexa.ru
+ * @license MIT
+ */
+class ZipChangesEntry extends ZipAbstractEntry
+{
+ /**
+ * @var ZipSourceEntry
+ */
+ protected $entry;
+
+ /**
+ * ZipChangesEntry constructor.
+ * @param ZipSourceEntry $entry
+ */
+ public function __construct(ZipSourceEntry $entry)
+ {
+ parent::__construct();
+ $this->entry = $entry;
+ $this->setEntry($entry);
+ }
+
+ /**
+ * @return bool
+ */
+ public function isChangedContent()
+ {
+ return !(
+ $this->getCompressionLevel() === $this->entry->getCompressionLevel() &&
+ $this->getMethod() === $this->entry->getMethod() &&
+ $this->isEncrypted() === $this->entry->isEncrypted() &&
+ $this->getEncryptionMethod() === $this->entry->getEncryptionMethod() &&
+ $this->getPassword() === $this->entry->getPassword()
+ );
+ }
+
+ /**
+ * Returns an string content of the given entry.
+ *
+ * @return null|string
+ * @throws ZipException
+ */
+ public function getEntryContent()
+ {
+ return $this->entry->getEntryContent();
+ }
+
+ /**
+ * @return ZipSourceEntry
+ */
+ public function getSourceEntry()
+ {
+ return $this->entry;
+ }
+}