SetaPDF_Core_Writer_TempStream A writer class for temporary streams

File: /SetaPDF v2/Core/Writer/TempStream.php

Class hierarchy

Implements

Summary

Properties

$_buffer

$_bufferSize

$_handle

The file stream resource

$_status

Status property


Methods

__construct()

public SetaPDF_Core_Writer_TempStream::__construct (
[ $memoryLimit = null [, $bufferSize = 10000 ]]
)

The constructor.

Parameters
$memoryLimit

Limit to use before writing to a temporary file. If null PHPs default (2 MB) is used.

$bufferSize

The buffer size of which needs to be reached until the data is written to the stream.

__destruct()

The deconstructor closes the file handle.

_flush()

protected SetaPDF_Core_Writer_TempStream::_flush (
void
): void

Flushes the buffer to the stream and resets the buffer.

_setHandle()

protected SetaPDF_Core_Writer_Stream::_setHandle (
$handle
): void

Set the stream handle.

Parameters
$handle
 

cleanUp()

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

copy()

public SetaPDF_Core_Writer_Stream::copy (
$source
): void

Copies an existing stream into the target stream.

Parameters
$source
 

finish()

public SetaPDF_Core_Writer_TempStream::finish (
void
): void

Finish methods flushes the buffer to the stream.

getHandle()

Gets the handle of the stream.

This method is overwritten to ensure that the handle is only accessed when the writer instance has the status "finished".

getPos()

Returns the current position.

getStatus()

Get the current status of the writer object.

start()

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

write()

Write content to the stream or buffer.

Parameters
$s