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

Class: File_Archive_Writer_UniqueAppender

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

Class Overview

File_Archive_Writer
   |
   --File_Archive_Writer_UniqueAppender

A writer wrapper that will remove the files the eventual duplicate


Variables

Methods


Inherited Variables

Inherited Methods

Class: File_Archive_Writer

File_Archive_Writer::close()
Close the writer, eventually flush the data, write the footer...
File_Archive_Writer::newFile()
Create a new file in the writer
File_Archive_Writer::newFileNeedsMIME()
Returns whether the writer newFile function needs the $mime parameter
File_Archive_Writer::newFromTempFile()
Create a new file in the writer with the content of the physical file $filename and then unlink $filename.
File_Archive_Writer::writeData()
Append the specified data to the writer
File_Archive_Writer::writeFile()
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

Class Details

[line 48]
A writer wrapper that will remove the files the eventual duplicate

files from the reader to keep only the new ones If there were already some duplications in the provided reader, not all duplication will be removed If you use newFile with the same filename several file, only the latest write will be kept (no time comparision is done)



[ Top ]


Class Variables

$fileList = array()

[line 52]


Type:   mixed


[ Top ]

$reader =

[line 50]


Type:   mixed


[ Top ]

$toDelete = array()

[line 53]


Type:   mixed


[ Top ]

$writer =

[line 51]


Type:   mixed


[ Top ]



Method Detail

File_Archive_Writer_UniqueAppender (Constructor)   [line 59]

File_Archive_Writer_UniqueAppender File_Archive_Writer_UniqueAppender( &$reader)

Construct a unique writer that will write to the specified writer

and remove duplicate files from the reader on close


Parameters:

   &$reader   — 

[ Top ]

close   [line 123]

void close( )

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

This function must be called before the end of the script


Overrides File_Archive_Writer::close() (Close the writer, eventually flush the data, write the footer...)
[ Top ]

newFile   [line 74]

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

  • See: File_Archive_Writer::newFile()

Overrides File_Archive_Writer::newFile() (Create a new file in the writer)

Parameters:

   $filename   — 
   $stat   — 
   $mime   — 

[ Top ]

newFileNeedsMIME   [line 98]

void newFileNeedsMIME( )

  • See: File_Archive_Writer::newFileNeedsMIME()

Overrides File_Archive_Writer::newFileNeedsMIME() (Returns whether the writer newFile function needs the $mime parameter)
[ Top ]

newFromTempFile   [line 86]

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

  • See: File_Archive_Writer::newFromTempFile()

Overrides File_Archive_Writer::newFromTempFile() (Create a new file in the writer with the content of the physical file $filename and then unlink $filename.)

Parameters:

   $tmpfile   — 
   $filename   — 
   $stat   — 
   $mime   — 

[ Top ]

writeData   [line 106]

void writeData( $data)

  • See: File_Archive_Writer::writeData()

Overrides File_Archive_Writer::writeData() (Append the specified data to the writer)

Parameters:

   $data   — 

[ Top ]

writeFile   [line 114]

void writeFile( $filename)

  • See: File_Archive_Writer::writeFile()

Overrides File_Archive_Writer::writeFile() (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)

Parameters:

   $filename   — 

[ Top ]


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