Confused with symfony2 packages

I am a little confused with symfony2 packages.

I want to know that everything in symfony is related to the main application.

I thought the Core of site is somewhere where I can write the code to use the packages, the way we use plugins from the main application code.

Or there is no main thing in Symfony. The very core will be the bundle

+2


source to share


3 answers


Symfony2 is a bundle-based framework => So everything as well as the core is a bundle.

You can see which package is loaded by default in app / AppKernel.php.



But Symfony2 also includes a library organized by "components (vendor / symfony / src / Symfony / Components). The bundled code can use this library."

+2


source


you can define your site entirely as a package, which means

Mycompany/MywebsiteBundle

      



Or you can define different sections of your site as different packages, which I personally prefer

`Mycompany/ForumBundle
 Mycompany/BlogBundle
 Mycompany/NewsletterBundle`

      

+5


source


Indeed, this is all a bundle. According to Symfony2 docs:

http://symfony.com/doc/2.0/book/page_creation.html#page-creation-bundles

0


source







All Articles