The mayor and city council shall have the power and authority to provide for a system of defense for indigent persons charged in the municipal court with violations of ordinances or state laws and for the prosecution of such cases by a prosecutor. The mayor and city council is further authorized to provide for the expense of indigent defense and prosecution by prorating the estimated cost over all criminal cases disposed of by the court and bond forfeitures in the criminal cases. A bond amount shall be imposed by the municipal court judge and collected in all criminal cases. Bond forfeitures in such cases shall be collected as costs in addition to fines, penalties, and all other costs.