Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Advanced Service Container Utilization
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Richard Miller
June 11, 2012
Programming
4
1.2k
Advanced Service Container Utilization
Richard Miller
June 11, 2012
Tweet
Share
More Decks by Richard Miller
See All by Richard Miller
Introduction to Symfony2 - DrupalCamp London 2014
richardmiller
0
290
Avoiding the mud
richardmiller
22
11k
better searching with elasticsearch - PHPConfPL
richardmiller
2
520
better searching with elasticsearch
richardmiller
2
300
Avoiding the mud - Symfony Live London
richardmiller
7
770
What do I get from the full stack framework?
richardmiller
1
1.6k
Dependency Injection and the Symfony2 Service Container
richardmiller
9
13k
Other Decks in Programming
See All in Programming
CSC307 Lecture 03
javiergs
PRO
1
480
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
190
Fragmented Architectures
denyspoltorak
0
140
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
160
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
410
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
100
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
160
CSC307 Lecture 04
javiergs
PRO
0
650
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
430
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
220
[AI Engineering Summit Tokyo 2025] LLMは計画業務のゲームチェンジャーか? 最適化業務における活⽤の可能性と限界
terryu16
2
590
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.8k
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
170
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
310
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
400
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
sira's awesome portfolio website redesign presentation
elsirapls
0
140
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Marketing to machines
jonoalderson
1
4.6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
Building AI with AI
inesmontani
PRO
1
660
Transcript
Advanced Service Container Utilization by Richard Miller (@mr_r_miller)
None
None
Getting the most from the Symfony2 service container
Knowing the injection options open to you
You may get to inject into the constructor
You might get to Inject into setter methods
You may have to inject into properties
You can integrate objects created by factories
You may need to integrate a static factory method
You can configure the container to use the factory method
You may be dealing with a separate factory object
You can also accommodate this with container configuration
Saving time by reducing the amount of configuration you have
to write
The wrong way with interface injection
What is interface injection?
How is interface injection configured?
Why you can't use it
The right way with parent services
You can have parent classes to reduce code repetition
You can also have a parent service to reduce repetitive
configuration
You can change configuration independently from code
Understanding the service container compilation process
You need to call compile if using the component outside
the framework
You get to load complex config from extensions
Using compiler passes to respond to other configuration
What if you want to use services from other bundles?
You need to dynamically register the tagged services
You can register compiler passes from bundles in the framework
Dumping the compiled container for performance
You get the performance benefits by caching the dumped container
You get convenience as well by avoiding the cache in
debug mode
Getting the most from the Symfony2 service container
Questions? @mr_r_miller richardmiller.co.uk