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
Richard Miller
June 11, 2012
Programming
1.3k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Advanced Service Container Utilization
Richard Miller
June 11, 2012
More Decks by Richard Miller
See All by Richard Miller
Introduction to Symfony2 - DrupalCamp London 2014
richardmiller
0
320
Avoiding the mud
richardmiller
22
12k
better searching with elasticsearch - PHPConfPL
richardmiller
2
550
better searching with elasticsearch
richardmiller
2
330
Avoiding the mud - Symfony Live London
richardmiller
7
800
What do I get from the full stack framework?
richardmiller
1
1.7k
Dependency Injection and the Symfony2 Service Container
richardmiller
9
13k
Other Decks in Programming
See All in Programming
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
0
140
Android CLI
fornewid
0
190
テーブルをDELETEした
yuzneri
0
110
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
190
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
880
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
150
えっ!!コードを読まずに開発を!?
hananouchi
0
270
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
250
AIが無かった頃の素敵な出会いの話
codmoninc
1
260
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
460
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
5分で問診!Composer セキュリティ健康診断
codmoninc
0
660
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
600
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Accessibility Awareness
sabderemane
1
160
The Pragmatic Product Professional
lauravandoore
37
7.4k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
The SEO identity crisis: Don't let AI make you average
varn
0
520
New Earth Scene 8
popppiees
3
2.4k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
570
Technical Leadership for Architectural Decision Making
baasie
3
450
Automating Front-end Workflow
addyosmani
1370
210k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.4k
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