@@ -103,14 +103,16 @@ Bundle class name with ``Extension``. For example, the Extension class of
103
103
``AcmeHelloBundle `` would be called ``AcmeHelloExtension ``::
104
104
105
105
// Acme/HelloBundle/DependencyInjection/AcmeHelloExtension.php
106
+ namespace Acme\HelloBundle\DependencyInjection;
107
+
106
108
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
107
109
use Symfony\Component\DependencyInjection\ContainerBuilder;
108
110
109
111
class AcmeHelloExtension extends Extension
110
112
{
111
113
public function load(array $configs, ContainerBuilder $container)
112
114
{
113
- // where all of the heavy logic is done
115
+ // ... where all of the heavy logic is done
114
116
}
115
117
116
118
public function getXsdValidationBasePath()
@@ -155,8 +157,8 @@ You can begin specifying configuration under this namespace immediately:
155
157
xsi : schemaLocation =" http://www.example.com/symfony/schema/ http://www.example.com/symfony/schema/hello-1.0.xsd" >
156
158
157
159
<acme_hello : config />
158
- ...
159
160
161
+ <!-- ... -->
160
162
</container >
161
163
162
164
.. code-block :: php
@@ -259,7 +261,7 @@ you might just merge them manually::
259
261
$config = array_merge($config, $subConfig);
260
262
}
261
263
262
- // now use the flat $config array
264
+ // ... now use the flat $config array
263
265
}
264
266
265
267
.. caution ::
@@ -289,7 +291,7 @@ configuration::
289
291
290
292
public function load(array $configs, ContainerBuilder $container)
291
293
{
292
- // prepare your $config variable
294
+ // ... prepare your $config variable
293
295
294
296
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
295
297
$loader->load('services.xml');
@@ -301,7 +303,7 @@ option is passed and set to true::
301
303
302
304
public function load(array $configs, ContainerBuilder $container)
303
305
{
304
- // prepare your $config variable
306
+ // ... prepare your $config variable
305
307
306
308
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
307
309
@@ -347,7 +349,7 @@ Add the following to the ``load()`` method to do this::
347
349
348
350
public function load(array $configs, ContainerBuilder $container)
349
351
{
350
- // prepare your $config variable
352
+ // ... prepare your $config variable
351
353
352
354
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
353
355
$loader->load('services.xml');
@@ -450,9 +452,8 @@ and build a tree that defines your configuration in that class::
450
452
451
453
$rootNode
452
454
->children()
453
- ->scalarNode('my_type')->defaultValue('bar')->end()
454
- ->end()
455
- ;
455
+ ->scalarNode('my_type')->defaultValue('bar')->end()
456
+ ->end();
456
457
457
458
return $treeBuilder;
458
459
}
@@ -500,6 +501,7 @@ automatically by Symfony2. If not, override the Bundle
500
501
:method: `Symfony\\ Component\\ HttpKernel\\ Bundle\\ Bundle::build ` method in
501
502
your bundle::
502
503
504
+ // ...
503
505
use Acme\HelloBundle\DependencyInjection\UnconventionalExtensionClass;
504
506
505
507
class AcmeHelloBundle extends Bundle
0 commit comments