Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitceacc7c

Browse files
committed
Explain sample configuration parameter usage
The "Processing the ``$configs`` Array" section explains how to define parameters within the Configuration class and process them in the Extension. In my opinion, it doesn't take the example to a logical conclusion. People reading this file want to learn how to create configuration within a Bundle. It would be helpful to explain how the configuration can be used. Since the example uses parameters, I propose showing how the parameters can be loaded into the container. With these code changes, the `twitter.client_id` and `twitter.client_secret` are now available through use throughout the application.
1 parent1a7f1f5 commitceacc7c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎cookbook/bundles/configuration.rst‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,12 @@ thrown)::
223223
$configuration = new Configuration();
224224

225225
$config = $this->processConfiguration($configuration, $configs);
226-
// ...
226+
227+
// Example configuration parameter usage: Set configuration variables as
228+
// parameters in the container.
229+
$container->setParameter('twitter.client_id', $config['twitter']['client_id']);
230+
$container->setParameter('twitter.client_secret', $config['twitter']['client_secret']);
231+
227232
}
228233

229234
The ``processConfiguration()`` method uses the configuration tree you've defined

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp