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

Class: File_Archive_Writer_Memory

Source Location: /File_Archive-1.0.0/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::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 59]

File_Archive_Writer_Memory File_Archive_Writer_Memory( &$data, 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)
   &$data   — 

[ Top ]

clear   [line 89]

void clear( )

Clear the buffer

[ Top ]

getData   [line 84]

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 94]

void isEmpty( )

Returns true iif the buffer is empty

[ Top ]

makeReader   [line 106]

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 70]

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 ]

writeData   [line 65]

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 14:21:14 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.