@@ -69,12 +69,14 @@ class name.
69
69
70
70
Each bundle has an alias, which is the lower-cased short version of the bundle
71
71
name using underscores (``acme_blog `` for ``AcmeBlogBundle ``). This alias
72
- is used to enforce uniqueness within a bundle (see below for some usage examples).
72
+ is used to enforce uniqueness within a bundle and for defining its configuration
73
+ (see below for some usage examples).
73
74
74
75
Directory Structure
75
76
-------------------
76
77
77
- The basic directory structure of a AcmeBlogBundle must read as follows:
78
+ The basic directory structure of an AcmeBlogBundle must read as follows (if you
79
+ use `PSR-4 `_ the ``Acme/ `` and ``BlogBundle/ `` folders might not exist):
78
80
79
81
.. code-block :: text
80
82
@@ -85,6 +87,7 @@ The basic directory structure of a AcmeBlogBundle must read as follows:
85
87
└─ BlogBundle/
86
88
├─ AcmeBlogBundle.php
87
89
├─ Controller/
90
+ ├─ README.md
88
91
├─ Resources/
89
92
│ ├─ meta/
90
93
│ │ └─ LICENSE
@@ -101,7 +104,11 @@ that automated tools can rely on:
101
104
102
105
* ``AcmeBlogBundle.php ``: This is the class that transforms a plain directory
103
106
into a Symfony bundle;
104
- * ``Resources/meta/LICENSE ``: The full license for the code;
107
+ * ``README.md ``: This file contains the basic description of the bundle and it
108
+ usually shows some basic examples and links to its full documentation;
109
+ * ``Resources/meta/LICENSE ``: The full license for the code. The license file
110
+ can also be stored in the bundle's root directory to follow the generic
111
+ conventions about packages;
105
112
* ``Resources/doc/index.rst ``: The root file for the Bundle documentation.
106
113
107
114
The depth of sub-directories should be kept to the minimum for most used
@@ -301,12 +308,6 @@ The end user can provide values in any configuration file:
301
308
// app/config/config.php
302
309
$container->setParameter('acme_blog.author.email', 'fabien@example.com');
303
310
304
- .. code-block :: ini
305
-
306
- ; app/config/config.ini
307
- [parameters]
308
- acme_blog.author.email = fabien@example.com
309
-
310
311
Retrieve the configuration parameters in your code from the container::
311
312
312
313
$container->getParameter('acme_blog.author.email');
@@ -319,7 +320,7 @@ Services
319
320
320
321
If the bundle defines services, they must be prefixed with the bundle alias.
321
322
For an AcmeBlogBundle for instance, all services must be prefixed with
322
- ``acme_blog_ ``.
323
+ ``acme_blog ``.
323
324
324
325
In addition, services not meant to be used by the application directly, should
325
326
be :ref: `defined as private <container-private-services >`.
0 commit comments