NetBeans IDE supports the running of Symfony2 commands. To run the commands from the IDE, choose Symfony2 | Run Command... from the project's context menu to launch the Run Symfony2 Command dialog box. In the dialog box, you may choose your desired Symfony commands and add parameters.
For example:
generate:bundle [--namespace="..."] [--dir="..."] [--bundle-name="..."] [--format="..."] [--structure]
The generate:bundle
command helps you generate new bundles. By default, the command interacts with the developer to tweak the generation. Any passed option will be used as a default value for the interaction (--namespace
is the only one needed if you follow the conventions):
php app/console generate:bundle --namespace=Acme/BlogBundle
Here, Acme
is your identifier or company name, and BlogBundle
is the bundle name suffixed with the string Bundle
.
A bundle is similar to a plugin in other software, but even better. The key difference is that everything is a bundle in Symfony2, including both the core framework functionality and the code written for your application. Bundles are first-class citizens in Symfony2. This gives you the flexibility to use pre-built features packaged in third-party bundles or to distribute your own bundles. It makes it easy to pick and choose which features to enable in your application and to optimize them the way you want.
A bundle is simply a structured set of files within a directory that implements a single feature. You might create a BlogBundle, a ForumBundle, or a bundle for user management (many of these already exist as open source bundles). Each directory contains everything related to that feature, including PHP files, templates, stylesheets, JavaScript, tests, and so on. Every aspect of a feature exists in a bundle, and every feature lives in a bundle.