apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: File_Archive_Writer

Source Location: /File_Archive-1.5.5/File/Archive/Writer.php

Class Overview


Base class for any writer


Methods


Child classes:

File_Archive_Writer_Gzip
Compress a single file to Gzip format
File_Archive_Writer_Memory
Write the concatenation of the files in a buffer
File_Archive_Writer_UniqueAppender
A writer wrapper that will remove the files the eventual duplicate
File_Archive_Writer_Bzip2
Compress a single file to Bzip2 format
File_Archive_Writer_Multi
Write to several writers
File_Archive_Writer_Output
Writer to the standard output
File_Archive_Writer_Mail
Send the files attached to a mail.
File_Archive_Writer_Files
Writer to files
File_Archive_Writer_Archive
Base class for all the transformation writers that will generate one single

Inherited Variables

Inherited Methods


Class Details

[line 37]
Base class for any writer


[ Top ]


Method Detail

close   [line 116]

void close( )

Close the writer, eventually flush the data, write the footer...

This function must be called before the end of the script


Overridden in child classes as:

File_Archive_Writer_Gzip::close()
Actually write the tmp file to the inner writer Close and delete temporary file
File_Archive_Writer_UniqueAppender::close()
Close the writer, eventually flush the data, write the footer...
File_Archive_Writer_Bzip2::close()
Actually write the tmp file to the inner writer Close and delete temporary file
File_Archive_Writer_Multi::close()
File_Archive_Writer_Mail::close()
File_Archive_Writer_Files::close()
File_Archive_Writer_Archive::close()
File_Archive_Writer_Tar::close()
File_Archive_Writer_MemoryArchive::close()
File_Archive_Writer_Ar::close()

[ Top ]

newFile   [line 46]

void newFile( string $filename, [array $stat = array()], [string $mime = "application/octet-stream"])

Create a new file in the writer

Overridden in child classes as:

File_Archive_Writer_Gzip::newFile()
File_Archive_Writer_Memory::newFile()
File_Archive_Writer_UniqueAppender::newFile()
File_Archive_Writer_Bzip2::newFile()
File_Archive_Writer_Multi::newFile()
File_Archive_Writer_Output::newFile()
File_Archive_Writer_Mail::newFile()
File_Archive_Writer_Files::newFile()
File_Archive_Writer_Archive::newFile()
File_Archive_Writer_Ar::newFile()

Parameters:

string   $filename   —  Name of the file, eventually including a path
array   $stat   —  Its Statistics. None of the indexes are required
string   $mime   —  MIME type of the file

[ Top ]

newFileNeedsMIME   [line 75]


newFromTempFile   [line 64]

void newFromTempFile( string $tmpfile, string $filename, [array $stat = array()], [string $mime = "application/octet-stream"])

Create a new file in the writer with the content of the physical file $filename and then unlink $filename.

newFromTempFile($tmpfile, $filename, $stat, $mime) is equivalent to newFile($filename, $stat, $mime); writeFile($tmpfile); unlink($tmpfile); but can be more efficient. A typical use is for File_Archive_Writer_Files: it renames the temporary file instead of copy/delete


Overridden in child classes as:

File_Archive_Writer_UniqueAppender::newFromTempFile()
File_Archive_Writer_Files::newFromTempFile()

Parameters:

string   $tmpfile   —  Name of the physical file that contains data and will be unlinked
string   $filename   —  Name of the file, eventually including a path
array   $stat   —  Its Statistics. None of the indexes are required
string   $mime   —  MIME type of the file

[ Top ]

writeData   [line 85]


writeFile   [line 97]

void writeFile( string $filename)

Append the content of the physical file $filename to the writer writeFile($filename) must be equivalent to writeData(file_get_contents($filename)) but can be more efficient

Overridden in child classes as:

File_Archive_Writer_UniqueAppender::writeFile()
File_Archive_Writer_Multi::writeFile()
File_Archive_Writer_Output::writeFile()
File_Archive_Writer_Tar::writeFile()
File_Archive_Writer_MemoryArchive::writeFile()
File_Archive_Writer_Ar::writeFile()

Parameters:

string   $filename   —  Name of the file which content must be appended to the writer

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:48:27 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.