8000 Minor reword · symfony/symfony-docs@7a31300 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7a31300

Browse files
committed
Minor reword
1 parent f9e279b commit 7a31300

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

bundles/configuration.rst

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,9 @@ as integration of other related components:
5757
Using the Bundle Extension
5858
--------------------------
5959

60-
The basic idea is that instead of having the user override individual
61-
parameters, you let the user configure just a few, specifically created,
62-
options. As the bundle developer, you then parse through that configuration and
63-
load correct services and parameters inside an "Extension" class.
64-
65-
As an example, imagine you are creating a social bundle, which provides
66-
integration with Twitter and such. To be able to reuse your bundle, you have to
67-
make the ``client_id`` and ``client_secret`` variables configurable. Your
68-
bundle configuration would look like:
60+
Imagine you are creating a new bundle - AcmeSocialBundle - which provides
61+
integration with Twitter, etc. To make your bundle easy to use, you want to
62+
allow users to configure it with some configuration that looks like this:
6963

7064
.. configuration-block::
7165

@@ -102,12 +96,16 @@ bundle configuration would look like:
10296
'client_secret' => 'your_secret',
10397
));
10498
99+
The basic idea is that instead of having the user override individual
100+
parameters, you let the user configure just a few, specifically created,
101+
options. As the bundle developer, you then parse through that configuration and
102+
load correct services and parameters inside an "Extension" class.
105103

106-
.. tip::
104+
.. note::
107105

108-
The root node of your bundle configuration must match the name of your
109-
bundle without the 'Bundle' suffix in camel case. For example
110-
``AcmeSocialBundle`` becomes ``acme_social``.
106+
The root key of your bundle configuration (``acme_social`` in the previous
107+
example) is automatically determined from your bundle name (it's the
108+
`snake case`_ of the bundle name without the ``Bundle`` suffix ).
111109

112110
.. seealso::
113111

@@ -446,3 +444,4 @@ Assuming the XSD file is called ``hello-1.0.xsd``, the schema location will be
446444
.. _`TwigBundle Configuration`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php
447445
.. _`XML namespace`: https://en.wikipedia.org/wiki/XML_namespace
448446
.. _`XML schema`: https://en.wikipedia.org/wiki/XML_schema
447+
.. _`snake case`: https://en.wikipedia.org/wiki/Snake_case

0 commit comments

Comments
 (0)
0