\PhpZip\Model\DataZipNewData

The class contains a streaming resource with new content added to the ZIP archive.

Summary

Methods
Properties
Constants
__construct()
getDataAsStream()
getDataAsString()
copyDataToStream()
__clone()
__destruct()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$guardClonedStream
$zipEntry
$stream
N/A

Properties

$guardClonedStream

$guardClonedStream : array<int,int>

A static variable allows closing the stream in the destructor only if it is its sole holder.

Type

array — array of resource ids and the number of class clones

$zipEntry

$zipEntry : \PhpZip\Model\ZipEntry

Type

ZipEntry

$stream

$stream : resource

Type

resource

Methods

__construct()

__construct(\PhpZip\Model\ZipEntry  $zipEntry, string|resource  $data) : mixed

ZipStringData constructor.

Parameters

\PhpZip\Model\ZipEntry $zipEntry
string|resource $data

Returns

mixed —

getDataAsStream()

getDataAsStream() : resource

Returns

resource —

returns stream data

getDataAsString()

getDataAsString() : string

Returns

string —

returns data as string

copyDataToStream()

copyDataToStream(resource  $outStream) : mixed

Parameters

resource $outStream

Returns

mixed —

__clone()

__clone() : mixed

Returns

mixed —

__destruct()

__destruct() : mixed

The stream will be closed when closing the zip archive.

The method implements protection against closing the stream of the cloned object.

Returns

mixed —