(a) When Punishment Authorized. The Municipal Judge may issue attachments for contempt, and punish summarily, only in the following cases:
(1) Misbehavior in the presence of his court, or so near thereto as to obstruct the administration of justice.
(2) Violence or threats of violence to the Municipal Judge or any officer, witness or party going thereto, attending or returning from court, for or in respect of any act or proceeding had or to be had in such court.
(3) Misbehavior of any officer in his official capacity, in respect to any act or judicial proceeding had or pending before the Municipal Judge, or any process, order or notice therein.
(4) Disobedience or resistance of an officer, witness, part of other person to any lawful process, judgment, order or notice of the Municipal Judge.
(b) Arrest and Prosecution. An order to arrest may be issued by the Municipal Judge on which the person charged with the contempt may be taken and brought before him, or such person may be taken in custody by any officer or any person upon the oral order of the municipal judge and held to answer for the contempt. An opportunity must be given the person charged to be heard in defense or explanation of his conduct, and the Municipal Judge may thereupon discharge him, or adjudge him guilty of the imprisonment or both. The fine shall not exceed fifty dollars, nor the imprisonment five days. The Municipal Judge shall not impose a fine for contempt unless the defendant be present in court, or shall have been served with a rule of the court to show cause, on some certain day, and shall have failed to appear and show cause.
(c) Judgement and Commitment. The conviction for contempt, specifying the particular circumstances of the offense and judgment thereon, must be entered by the municipal judge in his docket. A warrant of commitment for the term of imprisonment adjudged may be issued by the Municipal Judge commanding an officer to take the offender to the jail or other place designated for the imprisonment of City prisoners, and the keepers thereof to imprison him therein for such term. The judgment may include, in addition to fines, all costs in the case, including costs of arresting and keeping in prison the offender.