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

Class: File_Archive_Writer_Memory

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

Class Overview

File_Archive_Writer
   |
   --File_Archive_Writer_Memory

Write the concatenation of the files in a buffer


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 37]
Write the concatenation of the files in a buffer


[ Top ]


Class Variables

$mime =

[line 50]


Type:   mixed


[ Top ]

$stat =

[line 49]


Type:   mixed


[ Top ]



Method Detail

File_Archive_Writer_Memory (Constructor)   [line 62]

File_Archive_Writer_Memory File_Archive_Writer_Memory( &$data, [int $seek = 0], reference $data)


Parameters:

reference   $data   —  If provided, the data will be output in this variable. Any existent data in $data will be overwritten by the actual data of the writer. You should not modify manually this variable while using this writer (you can safely use all the functions of the archive, like clear for example)
int   $seek   —  keptData is the offset from where to start writing in $data Any data located after $seek will be erased The default value is 0
   &$data   — 

[ Top ]

clear   [line 99]

void clear( )

Clear the buffer

[ Top ]

getData   [line 94]

string &getData( )

Retrieve the concatenated data The value is returned by reference for performance problems, but you should not manually modify it
  • Return: buffer

[ Top ]

isEmpty   [line 104]

void isEmpty( )

Returns true iif the buffer is empty

[ Top ]

makeReader   [line 116]

void makeReader( [string $filename = null], [array $stat = null], [string $mime = null])

Create a reader from this writer

Parameters:

string   $filename   —  Name of the file provided by the reader
array   $stat   —  Statistics of the file provided by the reader
string   $mime   — 

Mime type of the file provided by the reader

Any unspecified parameter will be set to the value of the last file written in this writer


[ Top ]

newFile   [line 73]

void newFile( $filename, $stat, [ $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 82]

void newFileNeedsMIME( )

  • See: File_Archive_Writer::newFileNeedsMIME

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

writeData   [line 68]

void writeData( $d)


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

Parameters:

   $d   — 

[ Top ]


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