Klutz_Driver_fileKlutz Driver implementation for comics as files.
$Horde: klutz/lib/Driver/file.php,v 1.39 2008/09/08 21:28:18 mrubinsk Exp $
Required parameters:
'directory' The main directory the comics are stored in 'sumsfile' The filename to hold md5sums for images
Located in /lib/Driver/file.php (line 15)
Klutz_Driver | --Klutz_Driver_file
string
$basedir
= null (line 22)
The base directory we store comics in.
array
$diffs
= array() (line 46)
The actual array of unique image identifiers (md5 sums right now).
Key is the full path of the comic, value is md5
string
$subdir
= 'Ymd' (line 30)
The format for the various subdirectories.
WARNING: DO NOT CHANGE THIS!
string
$sumsfile
= 'sums' (line 37)
The file we store unique image identifiers in.
Constructor Klutz_Driver_file (line 53)
Constructs a new file storage object.
addSum (line 154)
Add a unique identifier for a given image.
imageExists (line 293)
Find out if we already have a local copy of this image.
imageSize (line 275)
Get the image dimensions for the requested image.
isUnique (line 203)
Determine if the image passed is a unique image (one we don't already have).
This allows for $days = random, etc., but keeps us from getting the same comic day after day.
listDates (line 226)
Get a list of the dates for which we have comics between $oldest and $newest. Only returns dates we have at least one comic for.
loadSums (line 79)
Load a list of unique identifiers for comics from the sumsfile.
rebuildSums (line 120)
Rebuild the table of unique identifiers.
removeDate (line 404)
Remove all images from the storage system (including unique IDs) for a given date.
removeImage (line 380)
Remove an image from the storage system (including its unique ID).
removeSum (line 173)
Remove the unique identifier for the given comic and/or
date. If both are passed, removes the uid for that comic and date. If only a comic is passed, removes all uids for that comic. If only a date is passed removes uids for all comics on that date. If neither is passed, all uids are wiped out.
retrieveImage (line 314)
Retrieve an image from storage. Make sure the image exists first with imageExists().
saveSums (line 100)
Save the list of unique identifiers for comics to the sumsfile.
storeImage (line 333)
Store an image for later retrieval.
Inherited From Klutz_Driver
Klutz_Driver::Klutz_Driver()
Klutz_Driver::factory()
Klutz_Driver::imageExists()
Klutz_Driver::imageSize()
Klutz_Driver::listDates()
Klutz_Driver::retrieveImage()
Klutz_Driver::singleton()
Klutz_Driver::storeImage()
Documentation generated on Sun, 30 Jan 2011 05:30:35 +0000 by phpDocumentor 1.4.3