-
Book Overview & Buying
-
Table Of Contents
Modular Programming with PHP 7
By :
We start off by creating a new module called Foggyline\PaymentBundle. We do so with the help of the console by running the following command:
php bin/console generate:bundle --namespace=Foggyline/PaymentBundle
The command triggers an interactive process which asks us several questions along the way, shown as follows:

Once done, files app/AppKernel.php and app/config/routing.yml are modified automatically. The registerBundles method of an AppKernel class has been added to the following line under the $bundles array:
new Foggyline\PaymentBundle\FoggylinePaymentBundle(),
The routing.yml has been updated with the following entry:
foggyline_payment: resource: "@FoggylinePaymentBundle/Resources/config/routing.xml" prefix: /
In order to avoid colliding with the core application code, we need to change the prefix: / to prefix: /payment/.
Even though we won't be storing any credit cards in our database as part of this chapter, we want to reuse the Symfony auto...