Implementation
We start off by creating a new module called Foggyline\CatalogBundle
. We do so with the help of the console, by running the command as follows:
php bin/console generate:bundle --namespace=Foggyline/CatalogBundle
The command triggers an interactive process that asks us several questions along the way, as shown in the following screenshot:
Once done, the following structure is generated for us:
If we now take a look at the app/AppKernel.php
file, we would see the following line under the registerBundles
method:
new Foggyline\CatalogBundle\FoggylineCatalogBundle() ...
Get PHP 7: Real World Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.