"A municipal corporation, in the exercise of all of its duties, including those most strictly local or internal, is but a department of the state. The legislature may give it all the powers such a being is capable of receiving, making it a miniature state within its locality. Again, it may strip it of every power, leaving it a corporation in name only, and it may create and recreate these changes as often as it chooses, or it may itself exercise directly within the locality any or all the powers usually committed to a municipality. We do not regard its acts as sometimes those of an agency of the state and at others those of a municipality, but that, its character and nature remaining at all times the same, it is great or small according as the legislature shall extend or contract the sphere of its action.
'"In his work on Municipal Corporations (sec. 835), Judge Dillon says,
'As the highway of a state, including streets in cities, are under the paramount and primary control of the legislature, and as all municipal powers are derived from the legislature, it follows that the authority of municipalities over streets, and the uses to which they may be put, depends entirely upon their charter or legislative enactments applicable to them. It is usual in this country for the legislature to confer upon municipal corporations very extensive powers in respect to streets and public ways within their limits, and the uses to which they may be appropriated. The authority to open, care for, regulate, and improve streets, taken in connection with the other powers usually granted, give to municipal corporations all needed authority to keep the streets free from obstructions and to prevent improper uses, and to ordain ordinances to this end.'"