Phpfox_Archive_Export

Description

Used to export data such as a 3rd party product or language package and compress it into a ZIP archive and force the user to download the package on the spot.

An example of how we would compress a language package and then send it to the user:

  1.  Phpfox::getLib('archive.export')->download('language-package''zip''english1');

  • author: Raymond Benc
  • version: $Id: export.class.php 1687 2010-07-22 03:13:27Z Raymond_Benc $
  • copyright: [PHPFOX_COPYRIGHT]

Located in /include/library/phpfox/archive/export.class.php (line 23)


	
			
Variable Summary
 array $_aArchives
Method Summary
 Phpfox_Archive_Export __construct ()
 bool download (string $sName, string $sExt, string $sFolder)
 array getSupported ()
 object Returns set (array $aArchives)
Variables
array $_aArchives = array() (line 30)

Supported methods of download for the specific data we plan on passing to the user

  • access: private
Methods
Constructor __construct (line 36)

Constructor

  • access: public
Phpfox_Archive_Export __construct ()
download (line 86)

Method used to compress data and then send it to the user to download on the spot.

  • return: Only returns false if we were unable to compress the data
  • access: public
bool download (string $sName, string $sExt, string $sFolder)
  • string $sName: Name of the archive
  • string $sExt: File extension of the archive (zip, tar.gz, xml)
  • string $sFolder: Folder to compress. Must be located within the "file/cache/" folder.
getSupported (line 73)

Based on the supported archives allowed with the set() method this returns all of them but based on what the server can actually support as well.

  • return: List of all the allowed archive.
  • access: public
array getSupported ()
set (line 46)

Set all the support archives you want to allow the user to download the data

  • return: this classes object
  • access: public
object Returns set (array $aArchives)
  • array $aArchives: Array of support archives

Documentation generated on Tue, 28 Sep 2010 10:36:39 +0200 by phpDocumentor 1.4.0a2