Class Klutz_Comic
Klutz Comic Class.
public
|
|
public
|
|
public
array
|
#
_prepareSearch( array $search )
Turn the search strings from the configuration file into preg_match-formatted strings |
public
mixed
|
#
getOverride( string $setting, timestamp $date = null, string $array_map = null )
Check for "override" settings - settings that override other settings depending on the day on which the comic appears |
public
string
|
#
substitute( string $string, timestamp $date = null )
Process known substitutions in a string. Currently known options: |
public
string
|
#
getInstance( timestamp $date )
Get the instance requested based on the date. The instance is determined by itype, iformat, idate, isow |
public
integer
|
|
public
integer
|
|
public
integer
|
#
getInstance_yearly( timestamp $date )
Get an instance number for a comic that appears yearly (NOT IMPLEMENTED!) |
public
integer
|
#
getInstance_ref( timestamp $date )
Get an instance number for a comic based on a date reference. This takes the idate option as a reference date, then uses the 'days' setting to determine how often it appears. Using this information it extrapolates which instance will occur on the date requested. |
public
string
|
$name
The title of the comics (Dilbert, The 5th Wave, etc.) |
#
null
|
public
string
|
$author
The author or authors of the comic (the byline) |
#
null
|
public
string
|
$homepage
The URL for the official homepage (not necessarily where we get the comic from. |
#
null
|
public
array
|
$days
Days (lowercase, three-letter english abbreviation) that this comic is is available. |
#
array('mon','tue','wed','thu','fri','sat','sun')
|
public
string
|
$comment
Some comment to display for this comic |
#
null
|
public
string
|
$offset
Days behind the current date this comic is published |
#
0
|
public
boolean
|
$nohistory
Are past episodes available? Some comics are difficult or impossible to retrieve other than the day it's published. |
#
false
|
public
HTTP_Request
|
$http
Web browser object used to fetch pages |
#
null
|
public
string
|
$url
The first url we need to hit to get the comic we want. |
|
public
string
|
$referer
The referral URL to use when fetching the comic. |
#
null
|
public
string
|
$agent
The user-agent to use when fetching the comic. |
#
null
|
public
string
|
$user
The username to use when fetching the comic. |
#
null
|
public
string
|
$pass
The password to use when fetching the comic. |
#
null
|
public
array
|
$cookies
Cookies to set when fetching the comic. |
#
array()
|
public
array
|
$headers
Headers to set when fetching the comic. |
#
array()
|
public
array
|
$subs
An array of the fields we need to do substitution on. |
#
null
|
public
string
|
$itype
Method for counting instances (when using the 'i' construct in substitutions. |
#
null
|
public
string
|
$iformat
Format string for the instance construct (printf string) |
#
'%d'
|
public
integer
|
$icount
The number of the "first" instance of the comic (the reference number) when using the reference-based instance type |
#
0
|
public
date
|
$idate
The date for which the reference is icount. |
#
null
|
public
string
|
$isow
The day the "week" starts for instance type weekly. Abbreviated day name in english, lowercase. |
#
'sun'
|
public
array
|
$override
The array of overrides by weekday. If sun_url exists, then when trying to fetch the sunday edition of this comic, it will fetch it from the specified url instead of $url. |
#
array()
|