/** * getCredits: Return all credits * @return array Array of all Credit objects */ public static function getCredits() { $getCredits = TPP::db()->query("\r\n\t\t\tSELECT `id`, `name`, `title`, `pokemon`, `quote`, `generations`, `link`\r\n\t\t\tFROM `credits`\r\n\t\t\tWHERE `order_id` > 0\r\n\t\t\tORDER BY `order_id`, `id`") or die(TPP::db()->error); while ($credit = $getCredits->fetch_assoc()) { $newCredit = new self(); $newCredit->setAttributes($credit); $newCredit->quote = Credit::getQuote($newCredit->quote); $newCredit->generations = self::getGenerations($newCredit->generations); $return[] = $newCredit; } return $return; }