array('keys' => array('FromUserId' => 'id'))); /** * Returns the opposite value of whatever is passed in (like an enum) * @param Mixed $input * @return String or Int; */ public static function status($input) { if (is_int($input)) { switch($input) { case "rejected": return 0; case "accepted": return 1; case "open": return 2; } } else { switch($input) { case 0: return "rejected"; case 1: return "accepted"; case 2: return "open"; } } } } ?>