mirror of
https://github.com/Ne-Lexa/php-zip.git
synced 2025-08-22 23:12:48 +02:00
Implemented the ability to override the instance of ZipContainer.
ZipContainer will be cloned before writing the zip file. Tested custom ZipWriter, ZipReader, ZipContainer and ZipFile.
This commit is contained in:
22
tests/Internal/Epub/EpubZipContainer.php
Normal file
22
tests/Internal/Epub/EpubZipContainer.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace PhpZip\Tests\Internal\Epub;
|
||||
|
||||
use PhpZip\Exception\ZipEntryNotFoundException;
|
||||
use PhpZip\Model\ZipContainer;
|
||||
|
||||
/**
|
||||
* Class EpubZipContainer.
|
||||
*/
|
||||
class EpubZipContainer extends ZipContainer
|
||||
{
|
||||
/**
|
||||
* @throws ZipEntryNotFoundException
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMimeType()
|
||||
{
|
||||
return $this->getEntry('mimetype')->getData()->getDataAsString();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user