File tree 1 file changed +23
-0
lines changed
Filter options
1 file changed +23
-0
lines changed
Original file line number Diff line number Diff line change @@ -456,6 +456,29 @@ Injecting the dependency by the setter method just needs a change of syntax:
456
456
and "setter injection". The Symfony service container also supports
457
457
"property injection".
458
458
459
+ .. tip ::
460
+
461
+ The YAML configuration files support an expanded syntax which may be useful
462
+ when the YAML contents are long and complex:
463
+
464
+ .. code-block :: yaml
465
+
466
+ # app/config/services.yml
467
+ services :
468
+ # traditional syntax
469
+ app.newsletter_manager :
470
+ class : AppBundle\Newsletter\NewsletterManager
471
+ calls :
472
+ - [setMailer, ['@app.mailer']]
473
+
474
+ # expanded syntax
475
+ app.newsletter_manager :
476
+ class : AppBundle\Newsletter\NewsletterManager
477
+ calls :
478
+ - method : setMailer
479
+ arguments :
480
+ - ' @app.mailer'
481
+
459
482
Learn more
460
483
----------
461
484
You can’t perform that action at this time.
0 commit comments