setasign\SetaPDF2\Core\Writer

StreamWriter A writer class for streams

File: /SetaPDF v2/Core/Writer/StreamWriter.php
Old class name (alias): \SetaPDF_Core_Writer_Stream

Class hierarchy

Implements

Summary

Properties

$_handle

protected resource StreamWriter::$_handle

The file stream resource

$_status

protected string AbstractWriter::$_status = 0

Status property


Methods

__construct()

public StreamWriter::__construct (
resource $handle
)

The constructor.

Parameters
$handle : resource
 

_setHandle()

protected StreamWriter::_setHandle (
resource $handle
): void

Set the stream handle.

Parameters
$handle : resource
 

cleanUp()

public AbstractWriter::cleanUp (
void
): void

Method which should/will be called when the document objects cleanUp() method is called.

copy()

WARNING: This method is marked as deprecated!

Use copyStream() instead.

public StreamWriter::copy (
resource|\SetaPDF_Core_Writer_Stream $source
): void
Parameters
$source : resource|\SetaPDF_Core_Writer_Stream
 

copyStream()

public StreamWriter::copyStream (
resource|\SetaPDF_Core_Writer_Stream $source
): void

Copies an existing stream into the target stream.

Parameters
$source : resource|\SetaPDF_Core_Writer_Stream
 

finish()

public AbstractWriter::finish (
void
): void

Method which should/will be called when the writing process is finished.

getHandle()

public StreamWriter::getHandle (
void
): resource

Get the stream handle.

getPos()

public StreamWriter::getPos (
void
): int

Returns the current position of the output file.

getStatus()

public AbstractWriter::getStatus (
void
): string

Get the current status of the writer object.

start()

public AbstractWriter::start (
void
): void

Method which should/will be called when the writing process starts.

write()

public StreamWriter::write (
string $s
): void

Write the content to the output file.

Parameters
$s : string