Property | Type | Description | |
---|---|---|---|
$comics | array | Array of comics and their associated attributes | |
$days | array | Used to translate between literal dow and numeric dow (sun = 0, 7) | |
$image_types | array | MIME types for images based on the return value from getimagesize | |
$sort | integer | Sorting method to use. Options are KLUTZ_SORT_NAME (sort by comic title), KLUTZ_SORT_AUTHOR (sort by Author's last name), and KLUTZ_SORT_NOSORT (don't promise any given sorting order). |
Method | Description | |
---|---|---|
Klutz ( integer $sort = KLUTZ_SORT_NAME ) | Constructor - Parse the /config/comics.php config file and store the results in $comic. Also tries to validate all the data it can and adjust case, etc., to more predictible consistency than humans editing config files can give. :) | |
_convertDay ( string $a ) : string | Convert a user-passed string into a three-letter, lowercased day abbr. | |
_sortComics ( string $a, string $b ) : integer | Comparse two comics and return -1, 0, or 1 based on the $sort member variable | |
comicObject ( string $index ) : object | Return a Klutz_Comic for the given index | |
getProperty ( string $index, string $property ) : mixed | Return the requested property for the requested comic | |
listByDriver ( string $driver, array $list = null ) : array | Return a list of comics that use the given fetch driver | |
listEnabled ( array $list = null, timestamp $date = null ) : array | Return a list of comics that are marked as enabled, and that should appear on a given day if a date is passed in. |
public _convertDay ( string $a ) : string | ||
$a | string | The string to convert |
return | string | A three-letter abbreviation for the requested day, or the first three letters of the passed string lowercased. |
public comicObject ( string $index ) : object | ||
$index | string | The index key for the desired comic |
return | object | A Klutz_Comic object for the given index |
public listEnabled ( array $list = null, timestamp $date = null ) : array | ||
$list | array | The list to extract from (default is all comics, but smaller arrays are okay). |
$date | timestamp | If passed in, check the $days array to make sure the comic should appear today. |
return | array | A list of comic indecies |
public array $comics | ||
return | array |
public array $days | ||
return | array |
public array $image_types | ||
return | array |
public int $sort | ||
return | integer |