-It shall be the duty of the court of common pleas of any county of the third through eighth classes to appoint a district attorney for the time being, in all cases where the district attorney and the assistants shall be absent from the court. A person so appointed shall perform all the duties of the office until the regular district attorney or one of the assistants shall appear in person to perform the same, and shall be paid such compensation by the county as may be fixed by the court.
16 P.S. § 1424