SetaPDF_Core_Writer_File A writer class for files or writable streams

File: /SetaPDF/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

protected string SetaPDF_Core_Writer_File::$_status = 0

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 void SetaPDF_Core_Writer_File::cleanUp ( void )

Close the file handle if needed.

See

copy()

public void SetaPDF_Core_Writer_File::copy ( resource $source )

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

Parameters
$source : resource
 

finish()

public void SetaPDF_Core_Writer_File::finish ( void )

This method is called when the writing process is finished.

It closes the file handle.

getPath()

public string SetaPDF_Core_Writer_File::getPath ( void )

Get the file path of the writer.

getPos()

public integer SetaPDF_Core_Writer_File::getPos ( void )

Returns the current position of the output file.

getStatus()

public string SetaPDF_Core_Writer_AbstractWriter::getStatus ( void )

Get the current status of the writer object.

start()

public void SetaPDF_Core_Writer_File::start ( void )

Method called when the writing process starts.

It setups the file handle for this writer.

write()

public void SetaPDF_Core_Writer_File::write ( string $s )

Write the content to the output file.

Parameters
$s : string