mirror of
https://github.com/Ne-Lexa/php-zip.git
synced 2025-10-10 21:04:36 +02:00
39 lines
786 B
PHP
39 lines
786 B
PHP
<?php
|
|
namespace PhpZip\Model\Entry;
|
|
|
|
use PhpZip\Exception\ZipException;
|
|
|
|
/**
|
|
* New zip entry from string.
|
|
*
|
|
* @see https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT .ZIP File Format Specification
|
|
* @author Ne-Lexa alexey@nelexa.ru
|
|
* @license MIT
|
|
*/
|
|
class ZipNewStringEntry extends ZipNewEntry
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $entryContent;
|
|
|
|
/**
|
|
* ZipNewStringEntry constructor.
|
|
* @param string $entryContent
|
|
*/
|
|
public function __construct($entryContent)
|
|
{
|
|
$this->entryContent = $entryContent;
|
|
}
|
|
|
|
/**
|
|
* Returns an string content of the given entry.
|
|
*
|
|
* @return null|string
|
|
* @throws ZipException
|
|
*/
|
|
public function getEntryContent()
|
|
{
|
|
return $this->entryContent;
|
|
}
|
|
} |