2

I am little bit confused with symfony2 bundles.

I want to know that does everything in symfony is bundle including main application.

I was thinking as Core of site is somewhere i can write code to use bundles like we use plugins from main application code.

Or there is no core thing in Symfony . The core itself will be bundle

j0k
  • 22,600
  • 28
  • 79
  • 90
Mirage
  • 30,868
  • 62
  • 166
  • 261

3 Answers3

5

you can define your website completely as a bundle, meaning

Mycompany/MywebsiteBundle

Or you can define the different, sections of your website as different bundle, which i personally preffer

`Mycompany/ForumBundle
 Mycompany/BlogBundle
 Mycompany/NewsletterBundle`
Confidence
  • 2,283
  • 3
  • 33
  • 57
2

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

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

But Symfony2 does also include a library, organized by "components (vendor/symfony/src/Symfony/Components). Code in bundle can use this library..

AlterPHP
  • 12,667
  • 5
  • 49
  • 54
0

Indeed, everything is a bundle. As per Symfony2 docs:

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

Darragh Enright
  • 13,676
  • 7
  • 41
  • 48