$name
$name : string
The title of the comics (Dilbert, The 5th Wave, etc.)
Klutz Comic Class.
getOverride(string $setting, \timestamp $date = null, string $array_map = null) : mixed
Check for "override" settings - settings that override other settings depending on the day on which the comic appears
string | $setting | The name of the setting to override |
\timestamp | $date | The date to check for overrides |
string | $array_map | Filter to be used with array_map |
If the setting is an array, returns the setting passed through array_map if array_map was passed. Otherwise, returns the value of the setting, overridden if an override is present
substitute(string $string, \timestamp $date = null) : string
Process known substitutions in a string. Currently known options:<br /> o {dow(int day, string format)} day is numeric day of the week, format format is an strftime string (e.g. '%Y%m%d'), replaced with the formatted date for the requested day of the week o {i} replaced with the instance of this comic as determined by the various instance configuration options<br /> o {format} format is an strftime string, replaced with todays date formatted according to the format string<br /> o {lc(string)} replaces string with string lowercased<br /> o {uc(string)} replaces string with string uppercased<br /> o {t(string)} removes extra space surrounding string<br /> o {tl0(string)} removes leading zeroes from string
string | $string | String to process |
\timestamp | $date | Date to use when processing subs |
A string with all substitutions made
getInstance_ref(\timestamp $date) : integer
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.
\timestamp | $date | The date the comic appears |
The instance number (unformatted)