Overview

Packages

  • Horde
    • Block
  • Klutz
  • None

Classes

  • Klutz
  • Klutz_Comic
  • Klutz_Comic_Bysize
  • Klutz_Comic_Direct
  • Klutz_Comic_Search
  • Klutz_Driver
  • Klutz_Driver_File
  • Klutz_Driver_Sql
  • Klutz_Image
  • Overview
  • Package
  • Class
  • Tree

Class Klutz

Klutz Base Class.

Copyright 2002-2012 Horde LLC (http://www.horde.org/)

Package: Klutz
Author: Marcus I. Ryan marcus@riboflavin.net
Located at Klutz.php
Methods summary
public
# 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. :)

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. :)

Parameters

$sort
Sorting method to use
public string
# _convertDay( string $a )

Convert a user-passed string into a three-letter, lowercased day abbr.

Convert a user-passed string into a three-letter, lowercased day abbr.

Parameters

$a
The string to convert

Returns

string

A three-letter abbreviation for the requested day, or the first three letters of the passed string lowercased.

public integer
# _sortComics( string $a, string $b )

Comparse two comics and return -1, 0, or 1 based on the $sort member variable

Comparse two comics and return -1, 0, or 1 based on the $sort member variable

Parameters

$a
The index of the first comic
$b
The index of the second comic

Returns

integer
@see strcmp
public array
# listEnabled( array $list = null, timestamp $date = null )

Return a list of comics that are marked as enabled, and that should appear on a given day if a date is passed in.

Return a list of comics that are marked as enabled, and that should appear on a given day if a date is passed in.

Parameters

$list
<p>The list to extract from (default is all comics, but smaller arrays are okay).</p>
$date
<p>If passed in, check the $days array to make sure the comic should appear today.</p>

Returns

array
A list of comic indecies
public array
# listByDriver( string $driver, array $list = null )

Return a list of comics that use the given fetch driver

Return a list of comics that use the given fetch driver

Parameters

$driver
The driver to check for
$list
The list to filter by driver (default all comics)

Returns

array

A list of the comics passed in that have been filtered based on driver

public object
# comicObject( string $index )

Return a Klutz_Comic for the given index

Return a Klutz_Comic for the given index

Parameters

$index
The index key for the desired comic

Returns

object
A Klutz_Comic object for the given index
public mixed
# getProperty( string $index, string $property )

Return the requested property for the requested comic

Return the requested property for the requested comic

Parameters

$index
The index key for the desired comic
$property
The desired property

Returns

mixed
The value of $property for $index
Properties summary
public array $days

Used to translate between literal dow and numeric dow (sun = 0, 7)

Used to translate between literal dow and numeric dow (sun = 0, 7)

# array('sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun')
public array $image_types

MIME types for images based on the return value from getimagesize

MIME types for images based on the return value from getimagesize

# array(1 => 'image/gif', 2 => 'image/jpg', 3 => 'image/png', 6 => 'image/bmp', 7 => 'image/tiff', 8 => 'image/tiff', )
public array $comics

Array of comics and their associated attributes

Array of comics and their associated attributes

# array()
public integer $sort

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).

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).

# null
API documentation generated by ApiGen