The opinion of the court was delivered by
Vanderbilt, C. J.We have certified this appeal on our own motion to bring before us for review the judgment of the Law Division of the Superior Court in favor of the plaintiffs, setting aside the action of the Township Committee of the Township of Moorestown in denying a permit for the construction of a gas station and holding invalid an ordinance regulating the use, storage, sale and disposal of gasoline and other inflammable materials.
*478The plaintiffs, Dr. Sidney Denbo and his wife Sylvia, are the owners of a building lot fronting on Main Street in the Township of Moorestown, Burlington County. In May 1955 they entered into an agreement with the plaintiff, Tidewater Oil Company, whereby the oil company agreed to purchase the lot in question upon the condition that the Denbos procure the necessary permit for the establishment of a gas station on the property.
The township zoning ordinance, adopted in 1948, permits such use by express provisions, but a permit must be obtained pursuant to another ordinance adopted by the township in 1928, which provides that no person shall erect or operate any building and equipment for the storage and sale of gasoline, fuel oil, kerosene and other highly inflammable or combustible liquids or materials without first obtaining a permit to do so from the township committee. The 1928 ordinance also sets forth the requirement that as part of the application for the permit the applicant must show that the building and equipment will be of fireproof construction and show also the particulars of the proposed location of the building and equipment, etc. Section 5 of that ordinance provides that:
“* * * after public hearing the Township Committee shall grant or refuse such permit as they shall deem proper for the protection of life and property from fire, explosions and other dangers.”
Section 8 of the ordinance provides that it was passed “under and in accordance with Chapter 152 of the Laws of 1917,” an enactment known as the Municipal Home Rule Act.
N. J. S. A. 40:48-l, which is part of the Municipal Home Rule Act, provides in part:
“40:48-l. Ordinances; general purpose
The governing body of every municipality may make, amend, repeal and enforce ordinances to:
Inflammable materials; inspect doelcs and buildings. 14. Kegulate the use, storage, sale and disposal of inflammable or combustible materials, and to provide for the protection of life and property from fire, explosions and other dangers; to provide for inspections of *479buildings, docks, wharves, warehouses and other places, and of goods and materials contained therein, to secure the proper enforcement of such ordinance;” (emphasis supplied).
R. S. 40:48-2 provides:
“40 :48-2. Other necessary and proper ordinances
Any municipality may make, amend, repeal and enforce such other ordinances, regulations, rules and by-laws not contrary to the laws of this state or of the United States, as it may deem necessary and proper for the good government, order and protection of persons and property, and for the preservation of the public health, safety and welfare of the municipality and its inhabitants, and as may be necessary to carry into effect the powers and duties conferred and imposed by this subtitle, or by any law.”
Pursuant to the ordinance the Denbos applied for a permit, furnishing the required information to the township committee. Public hearings on the application were held on several occasions, and at a special meeting on November 7, 1955 the township committee adopted a resolution finding the material facts and denying the application for the permit.
The resolution is quite informative and indicates that the real basis for the denial of the permit was that:
“* * * traffic conditions on Main Street, in The Township of Moorestown, between Chester Avenue and the Westerly end of the central business district, are, during business hours, greatly congested, and extremely hazardous for both vehicular and pedestrian traffic; that the establishment and operation of a drive-in and drive-out filling and service station on the applicant’s land would necessarily have the effect of further impeding vehicular traffic on Main Street and would substantially increase the more than ordinarily hazardous traffic conditions now existing on said street at the location in question; and that there is no present or discernible future public need for additional facilities for the supply of gasoline and oil on Main Street in the area referred to; and that in the interest of the public safety the present application should not be granted.”
The plaintiff thereupon instituted the present action in lieu of prerogative writ. A motion by the plaintiffs for summary judgment was denied by the trial judge because of the existence of a genuine issue as to whether the proposed *480gas station would “utilize all modern methods to prevent fire hazards and to effect traffic safety.” This issue was completely disposed of in favor of the plaintiffs after trial. The trial court held that in the circumstances of the case the action of the township committee was arbitrary because it had no real relation to the object of the ordinance. It also held the ordinance invalid on the ground that it failed to set up any standard by which the discretion of the township committee could be circumscribed and that a grant of power to refuse a permit “as they shall deem proper for the protection of life and property from fire, explosions and other dangers” was not sufficient criterion to control the actions of a municipal body.
The plaintiff’s main contention is that the ordinance in question does not permit the township committee to refuse to issue a permit on the ground that a gasoline station would increase the traffic hazards and thereby endanger life and property, and that the “other dangers” than fire and explosions referred to in the ordinance as a basis for the denial of a permit must be taken to mean, under the rule of ejusdem generis, dangers of a similar destructive nature, citing In re Armours Estate, 11 N. J. 257 (1953) and Sluderus Oil Co., Inc. v. Jersey City, 128 N. J. L. 286, 291 (Sup. Ct. 1942).
The defendants urge that the 1928 ordinance constitutes a valid exercise of police power by the municipality and that the present action of the township committee is well within the authority intended by such ordinance. In an attempt to overcome the effect of the ejusdem generis rule they urge that such a narrow construction forced by the application of that rule is contrary to the Home Rule Act, B. S. 40:42-4, which expressly provides that:
“40:42 — 4. Municipalities given fullest powers
In construing the provisions of this sub-title, all courts shall construe the same most favorably to municipalities, it being the intention to give all municipalities to which this subtitle applies the fullest and most complete powers possible over the internal affairs of such municipalities for local self-government.”
*481and also contrary to the Constitution of 1947, Art. IV, Sec. VII, par. 11 which provides in part that:
“* * * any law concerning municipal corporations formed for local government, or concerning counties, shall be liberally construed in their favor.”
They likewise defend the validity of the ordinance urging that “the protection of life and property from fire, explosions and other dangers” is a sufficient general standard by which the discretionary conduct of the township committee can be measured in light of the objects to be achieved by the ordinance. They argue furthermore that public convenience and necessity is a material element in the consideration of the township committee and valid reason to deny a permit if such is found to be lacking.
The true meaning and intention of legislation must be derived from the whole and not from any single component part, or else distortion is sure to result. In enacting legislation the lawmakers are deemed to have had a definite purpose in mind, and to have included the component parts of the enactment to accomplish that purpose. The purpose of a law, says Sutherland: “is an implied limitation on the sense of general terms, and a touchstone for the expansion of narrower terms,” and that “the cardinal purpose or intent of the whole act shall control, and that all the parts be interpreted as subsidiary and harmonious,” 2 Sutherland, Statutory Construction, 3d ed., sec. 4704, p. 338; see also Blackman v. Iles, 4 N. J. 82, 88 (1950); Lynch v. City of Long Branch, 111 N. J. L. 148 (1933). In the Lynch case Mr. Justice Heher tersely stated the rule:
“It is an established rule in the exposition of statutes that the intention of the Legislature is to be derived from a view of the whole and of every part of the statute, taken and compared together. The real intention, when ascertained, will prevail over the literal sense of terms. When words are not explicit the intention is to be collected from the context and the occasion and necessity of the law and from the mischief felt, and the remedy in view; and the intention is to be taken or presumed according to what is consonant *482to reason and good discretion. In re Merrill, 88 N. J. Eq. 261, 273 [Prerog. Ct. 1917].
The meaning of general words must be restricted whenever it is found necessary to carry out the legislative intention. The reason and spirit of the statute controls in its interpretation.’
In Studerus Oil Co. v. Jersey City, 128 N. J. L. 286 (Sup. Ct. 1942), the applicable rule with respect to construction of general words of the nature here involved is set forth. The court, at page 291, says:
“It is the long settled rule (ejusdem, generis) in the construction of statutes that when general words * * * follow specifically named things of a particular class * * *, the general words must be understood * * * as limited to things of the same class, or at least of the same general character. Livermore v. Board of Chosen Freeholders of Camden, 31 N. J. L. 507, 511, 512 [E. & A. 1864], Cf. Curtis & Hill Gravel & Sand Co. v. State Highway Commission, 91 N. J. Eq. 421, at page 429, et seq.; 111 A. 16 [Ch. 1920].”
This ordinance was passed at a time in the history of the township when the traffic problem and its incident hazards on which it now relies to deny the permit was not the imposing one that it is today. The purpose of the ordinance beyond a shadow of a doubt was merely to provide for a means of controlling, for the protection of the inhabitants of the township and others, the use, handling and storage of dangerous volatile and combustible materials. The language of section 5 of the ordinance which holds the key to its general purpose is identical with the language of N. J. S. A. 40:48-1(14) and seems to be based on the powers conferred thereby which do not include within its scope the power to regulate traffic hazards. There is nothing in the enactment from which to glean even the spark of an intention to include within the general terms used every danger even remotely connected with the materials referred to in the ordinance, and to read into the reference to “other dangers” an intention to protect life and property from damage or destruction that could result from an increase in traffic hazards is totally unwarranted. There is nothing present to indicate *483that the general power granted to the municipality by B. 8. 40:48-2 formed any basis for the promulgation of the ordinance in question. The liberal construction provision of the Home Rule Act and the Constitution do not require that we construe the 1928 ordinance to effect a purpose never intended, Lynch v. Borough of Edgewater, 8 N. J. 279, 286 (1951). To do so is to judicially legislate and beyond our power.
In the resolution adopted by the township there is not even a suggestion that their denial was based on an attempt to effectuate the fundamental purpose of the ordinance, namely to protect personal property from the hazards of highly combustible materials. By reading into the words “other dangers” the power to generally control every incident of the use of gasoline, the township committee has usurped a power which it does not yet have. What “other dangers” apart from fire and explosion might have been intended is difficult to imagine, but whatever they may have been it is not difficult to recognize that there was no intention by the use of the general term to include a power to prohibit gas stations because the automobiles driving in and out of it would increase the possibility of injury to persons and property by adding a burden to the already traffic swollen Main Street.
The lot in question is on the main street in the heart of Moorestown. Any new business would have the same, and possibly a greater effect upon existing conditions.
The crux of this case is apparent. The township does not want any more gasoline stations in this area. We can well understand the aversion that the people of a progressive municipality, proud of the appearance of their main streets, might have to the addition of another gas station in their midst. But, in this day and age this form of business can. be made no less attractive than some of the fine stores that have grown up in our cities, towns and villages. The architectural ingenuity that has been brought to bear to avert the popular distaste is something short of astounding. In some cases this form of business enterprise is to be preferred over *484other forms such as supermarkets which bring troublesome parking and other problems. The method followed here, however, is not the way to regulate property use. The zoning power furnishes adequate means and is accompanied by appropriate protections which insure equality of treatment, Schmidt v. Board of Adjustment of City of Newark, 9 N. J. 405 (1952).
The total irrelevancy of the basis upon which the township has denied the permit indicates a misapprehension of the basic power delineated by the ordinance and an arbitrary use of power as an end in itself rather than a means to the end expressed in the ordinance. In view of this conclusion there is no need to pass upon the sufficiency of the standard set forth in section 5 of the ordinance, State v. Fair Lawn Service Center, Inc., 20 N. J. 468, 471 (1956); Grobart v. Grobart, 5 N. J. 161, 165 (1950).
The judgment below is modified so as to strike therefrom the provisions with respect to invalidity of the ordinance and except as modified it is affirmed.
For affirmance — Chief Justice Vanderbilt, and Justices Wachenfeld, Burling, Jacobs and Weintraub — 5.For reversal — Hone.