The mayor and city council may provide by ordinance for the taking of appearance bonds, to be made by persons charged with the violation of any of the laws or ordinances of the city. They may prescribe by ordinance for the taking of cash collateral bond or have bonds issued by personal solvent securities and they may provide for the summary forfeiture of all cash bonds and for the summary forfeiture of all other appearance bonds by order of the recorder's court, or mayor's court which order when entered may be enforced by executions therefor, issued by the city clerk.