\DownloadTempFile
Saves the location of a temporary file used for downloads.
Could be a zip file or a single (probably larger) file.
- Author: Mark Guinn <mark@adaircreative.com>
Synopsis
class DownloadTempFile
extends File
{
- // constants
- const PENDING = "Pending";
- const ACTIVE = "Active";
- const COMPLETE = "Complete";
- // members
- private static array $db = ;
- private static array $many_many = ;
- // methods
- public bool check()
- public void updateFileKey()
- public static DownloadTempFile get_by_files()
- public string getProcessingLink()
- public void process()
- public bool isZombie()
- public bool isOutdated()
- public string getFriendlyName()
Hierarchy
Extends
- File
Constants
Name | Value |
---|---|
PENDING | "Pending" |
ACTIVE | "Active" |
COMPLETE | "Complete" |
Members
private
- $db
- $many_many
Methods
public
- check() — Checks to see if this tempfile contains the same files as the list given, in which case it could be re-used.
- getFriendlyName() — Returns a more user-friendly filename for use when forcing a download.
- getProcessingLink()
- get_by_files()
- isOutdated() — Is this file old enough to be deleted?
- isZombie() — Checks if the state is active and the start time was an unreasonable amount of time ago
- process() — Copies and/or zips the file(s) into the correct temporary folder.
- updateFileKey() — Updates the "FileKey" that we use to check for existing caches with the same files.