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

Class: File_Archive_Writer

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

Class Overview


Base class for any writer


Methods


Child classes:

File_Archive_Writer_Archive
Base class for all the transformation writers that will generate one single
File_Archive_Writer_Files
Writer to files
File_Archive_Writer_Mail
Send the files attached to a mail.
File_Archive_Writer_Memory
Write the concatenation of the files in a buffer
File_Archive_Writer_Multi
Write to several writers
File_Archive_Writer_Output
Writer to the standard output

Inherited Variables

Inherited Methods


Class Details

[line 37]
Base class for any writer


[ Top ]


Method Detail

close   [line 88]

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_Archive::close()
File_Archive_Writer_MemoryArchive::close()
File_Archive_Writer_Files::close()
File_Archive_Writer_Mail::close()
File_Archive_Writer_Multi::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_MemoryArchive::newFile()
File_Archive_Writer_Files::newFile()
File_Archive_Writer_Mail::newFile()
File_Archive_Writer_Memory::newFile()
File_Archive_Writer_Multi::newFile()
File_Archive_Writer_Output::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 ]

writeData   [line 56]

void writeData( String $data)

Append the specified data to the writer

Overridden in child classes as:

File_Archive_Writer_MemoryArchive::writeData()
File_Archive_Writer_Files::writeData()
File_Archive_Writer_Mail::writeData()
File_Archive_Writer_Memory::writeData()
File_Archive_Writer_Multi::writeData()
File_Archive_Writer_Output::writeData()

Parameters:

String   $data     the data to append to the writer

[ Top ]

writeFile   [line 69]

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_MemoryArchive::writeFile()
File_Archive_Writer_Multi::writeFile()
File_Archive_Writer_Output::writeFile()

Parameters:

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

[ Top ]


Documentation generated on Thu, 24 Feb 2005 12:50:22 -0500 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.