sensio/SensioGeneratorBundle — pull request #157 by WouterJ (2012-10-14 13:16:11+00:00)
Title: Adding generate controller

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #33
Todo: -
License of the code: MIT
Documentation PR: na

This PR creates a new Command: `generate:controller`.

This command creates a Controller class and a ControllerTest class inside a given bundle, `--controller AcmeBlogBundle:Post` generates these files: `src/Acme/BlogBundle/Controller/PostController.php` and `src/Acme/BlogBundle/Tests/Controller/PostControllerTest.php`. Both files include use statements and the class.

You can also generate actions. This command creates routing (in the given format), templates (in the given format), test stubs and an action method inside the controller.