wasp.util
[ class tree: wasp.util ] [ index: wasp.util ] [ all elements ]

Class: DownloadFile

Source Location: /util/DownloadFile.php

Class Overview


DownloadFile is a class used to save information to a file that will be later sent to a client browser as a download file.


Author(s):

  • brian.fioca@pangomedia.com

Variables

Methods



Class Details

[line 28]
DownloadFile is a class used to save information to a file that will be later sent to a client browser as a download file.



Tags:

since:  0.9.1
author:  brian.fioca@pangomedia.com


[ Top ]


Class Variables

$_oFile =

[line 31]

Handle to the file



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 37]

DownloadFile __construct( stFileName $stFileName)

Standard constructor takes the name of the file to be written to.



Parameters:

stFileName   $stFileName   the name of the file to be written to

[ Top ]

destructor __destruct [line 46]

void __destruct( )

Destructor closes the file



[ Top ]

method close [line 65]

void close( )

Closes the file.



Tags:

access:  public


[ Top ]

method sendDownload [line 77]

void sendDownload( stFileName $stFileName, [stDownloadName $stDownloadName = null], [mixed $stDir = TEMP_DIR])

This static method will send a file that (presumably) has already been written to as a downloaded file to the browser.



Tags:

static:  
access:  public


Parameters:

stFileName   $stFileName   the name of the file on the server to send (from within TEMP_DIR)
stDownloadName   $stDownloadName   the name of the file that the client will see

[ Top ]

method writeLine [line 55]

void writeLine( the $stLine)

Writes a line to the file. The line will end with \r\n for compatibility purposes



Tags:

access:  public


Parameters:

the   $stLine   text of the line to be written

[ Top ]


Documentation generated on Sun, 27 Nov 2005 13:15:50 -0500 by phpDocumentor 1.3.0RC3