/** * Returns a transient by chat_id, building it if it doesn't exist * * @author caseypatrickdriscoll * * @created 2015-08-27 18:54:19 * * @param int $chat_id The given post_id of the requested patchchat * @return string $transient The json representation of a chat */ public static function get($chat_id) { $transient = get_transient('patchchat_' . $chat_id); if ($transient === false) { $transient = PatchChat_Transient::build($chat_id); } return $transient; }