Local government in the Philippines
Local governments have two branches: executive and legislative. All courts in the Philippines are under the Supreme Court of the Philippines and therefore there are no local-government controlled judicial branches. Nor do local governments have any prosecutors or public defenders, as those are under the jurisdiction of the national government.
Local government in California
California's judicial system is organized along county lines, but the county courts are a part of the state court system, and are not part of the county government. Historically, counties were responsible for providing courthouses and courthouse security for the Superior Courts of California (there is one superior court for each county), even though the superior courts were actually divisions of the state government, not the county governments. This unfunded mandate was a perennial source of frustration for both the superior courts and the counties. The Legislature finally responded by enacting the Trial Court Funding Act of 1997 and then the Trial Court Facilities Act of 2002 to transfer all courthouses to the state government and to relieve the counties of the burden of providing facilities to state courts. However, because the state government was not prepared to assume the burden of developing its own statewide courthouse security force, the superior courts were allowed to establish agreements with county sheriffs by which the courts would reimburse counties for continuing to provide deputy sheriffs to serve as bailiffs in the courthouses.