As this case is before us on writ of certiorari, we can dispose of all questions arising on the record.
Upon the pleadings two principal inquiries arise: First, whether the Pennsylvania Company, having made an arrangement with the Parmelee Transfer Company to furnish, at its passenger station, from time to time, all vehicles necessary for the accommodation of passengers arriving there on its trains or on the trains of other railroad companies, may legally exclude from its depot grounds or passenger station all hackmen or expressmen coming to either for the purpose only of soliciting for themselves the custom or patronage of passengers. Second, whether, in virtue of its ownership of the passenger station and depot grounds in question, the railroad company is entitled, in prosecuting its business, to any greater privileges in respect of the use of the sidewalk and street in front of the main entrance to such station than belonged to the defendants in the prosecution of their business.
Much has been said in argument as to the functions and duties of railroad companies. Under the decisions of this court there can be no doubt as to the nature of those functions or duties. In New Jersey Steam Nav. Co. v. Merchants' Bank, 6 How. 344, 382, 12 L. ed. 465, 482, this court held that a corporation engaged, under legislative authority, in the transportation of passengers and freight over navigable waters, was 'in the exercise of a sort of public office, and has public duties to perform.' In Olcott v. Fond du Lac County, 16 Wall. 678, 694, 695, 21 L. ed. 382, 388, it was adjudged that a railroad, whether constructed by a private corporation or by individuals under the authority of a legislative grant, or by the state itself, was a public highway, and that the function performed by the corporation was that of the state, and the uses to which its property was devoted were of a public nature. In Queensbury v. Culver, 19 Wall. 83, 91, 22 L. ed. 100, 104, it was said that the construction or maintenance of a public highway was 'for the promotion of a publicuse.' So in Pine Grove Twp. v. Talcott, 19 Wall. 666, 676, 22 L. ed. 227, 233, which involved the validity of taxation, under legislative authority, to aid in the construction of a railroad by a corporation: 'Though the corporation was private, its work was public, as much so as if it were to be constructed by the state.' Again, in Cherokee Nation v. Southern Kansas R. Co. 135 U.S. 641, 657, 34 L. ed. 295, 302, 10 Sup.Ct.Rep. 965, 971: 'The question is no longer an open one, as to whether a railroad is a public highway, established primarily for the convenience of the people, and to subserve public ends, and therefore subject to governmental control and regulation. It is because it is a public highway, and subject to such control, that the corporation by which it is constructed, and by which it is to be maintained, may be permitted, under legislative sanction, to appropriate private property for the purposes of a right of way, upon making just compensation to the owner in the mode prescribed by law.' To the same effect are United States v. Trans-Missouri Freight Asso. 166 U.S. 290, 332, 41 L. ed. 1007, 1024, 17 Sup.Ct.Rep. 540; Smyth v. Ames, 169 U.S. 466, 544, 42 L. ed. 819, 848, 18 Sup.Ct.Rep. 418; Lake Shore & M. S. R. Co. v. Ohio, 173 U.S. 285, 301, 43 L. Ed. 702, 708, 19 Sup.Ct.Rep. 465. Necessarily, the same principles apply in reference to the use of the company's station house and depot grounds; for they are held in the same right as are its road, its locomotives, and other property or appliances employed in the transportation of passengers and freight, and must be devoted primarily to public use to the extent necessary for the public objects intended to be accomplished by the construction and maintenance of the railroad as a highway.