SetaPDF_Core_Writer_File A writer class for files or writable streams

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

Class hierarchy

Implements

Summary

Properties

$_handle

protected null|resource SetaPDF_Core_Writer_File::$_handle

The file handle resource

$_path

protected string SetaPDF_Core_Writer_File::$_path

Path to the output file

$_status

Status property


Methods

__construct()

public SetaPDF_Core_Writer_File::__construct (
string $path
)

The constructor.

Parameters
$path : string

The path to the output file

cleanUp()

public SetaPDF_Core_Writer_File::cleanUp (
void
): void

Close the file handle if needed.

See

copy()

public SetaPDF_Core_Writer_File::copy (
resource $source
): void

Copies an existing file into the target file and resets the file handle to the end of the file.

Parameters
$source : resource
 

finish()

public SetaPDF_Core_Writer_File::finish (
void
): void

This method is called when the writing process is finished.

It closes the file handle.

getPath()

public SetaPDF_Core_Writer_File::getPath (
void
): string

Get the file path of the writer.

getPos()

public SetaPDF_Core_Writer_File::getPos (
void
): integer

Returns the current position of the output file.

getStatus()

Get the current status of the writer object.

start()

public SetaPDF_Core_Writer_File::start (
void
): void

Method called when the writing process starts.

It setups the file handle for this writer.

write()

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

Write the content to the output file.

Parameters
$s : string