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

Class: File_Archive_Writer

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

Class Overview


Base class for any writer


Methods


Child classes:

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
File_Archive_Writer_Mail
Send the files attached to a mail.
File_Archive_Writer_Files
Writer to files

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_Multi::close()
File_Archive_Writer_Mail::close()
File_Archive_Writer_Files::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_Memory::newFile()
File_Archive_Writer_Multi::newFile()
File_Archive_Writer_Output::newFile()
File_Archive_Writer_Mail::newFile()
File_Archive_Writer_Files::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_Memory::writeData()
File_Archive_Writer_Multi::writeData()
File_Archive_Writer_Output::writeData()
File_Archive_Writer_Mail::writeData()
File_Archive_Writer_Files::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_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 Mon, 11 Mar 2019 14:21:14 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.