Except as otherwise prescribed by general rules, an application to the court under this subchapter shall be by petition and shall be heard in the manner and upon the notice provided or prescribed by law for the making and hearing of petitions in civil matters. Unless the parties otherwise agree, notice of an initial application for an order of court shall be served in the manner provided or prescribed by law for the service of a writ of summons in a civil action.