Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Stack (sfugzh)
Search
Igor Wiedler
October 02, 2013
Programming
8.4k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Stack (sfugzh)
Short stack introduction at the symfony usergroup zürich.
Igor Wiedler
October 02, 2013
Transcript
26 slides
None
Bundles ServiceProviders Modules ServiceProviders Modules ???
Framework Container HTTP
Framework Container HTTP
HttpKernelInterface
not about caching or functional tests
None
Routing Events Controllers Bundles Services Http
None
do something before or after every request
different take on event listeners
class Foo implements HttpKernelInterface { private $app; public function __construct(HttpKernelInterface
$app) { $this->app = $app; } public function handle(Request $request, ...) { $response = $this->app->handle($request, $type, $catch); return $response; } } 1 2 3
class Logger implements HttpKernelInterface { private $app; private $logger; public
function __construct(HttpKernelInterface $app, LoggerInterface $logger) { $this->app = $app; $this->logger = $logger; } public function handle(Request $request, ...) { $response = $this->app->handle($request, $type, $catch); $this->log($request, $response); return $response; } private function log(Request $request, Response $response) { ... } }
$app = new CallableHttpKernel(function ($request) { return new Response('Hello World!');
});
$app = new Logger( $app, new Monolog\Logger() );
UrlMap $blog = new Silex\Application(); $blog->get('/', function () { return
'This is the blog!'; }); $app = new Stack\UrlMap($app, [ '/blog' => $blog, ]);
Session $app = new CallableHttpKernel(function ($request) { $session = $request->getSession();
... }); $app = new Stack\Session($app);
OAuth $app = new Igorw\Stack\OAuth($app, [ 'key' => 'foo', 'secret'
=> 'bar', 'callback_url' => 'http://localhost:8080/auth/verify', 'success_url' => '/', 'failure_url' => '/auth', ]); $app = new Stack\Session($app);
OAuth $request->attributes->get('oauth.token');
Composition!
$stack = (new Stack\Builder()) ->push('Stack\Session') ->push('Igorw\Stack\OAuth', [...]) ->push('Foo'); $app =
$stack->resolve($app);
• GeoIp • IpRestrict • Backstage • Basic Authentication •
Hawk • CORS Community
It doesn’t stop there
• Authentication • Debug toolbar • Injected routes • Signed
cookies • Asset management • Force SSL • Error handling
( )
Questions? • stackphp.com • #stackphp • @stackphp • @igorwesome
More Decks by Igor Wiedler
See All by Igor Wiedler
Redis Bedtime Stories
igorw
1
400
Wide Event Analytics (LISA19)
igorw
4
970
a day in the life of a request
igorw
0
190
production: an owner's manual
igorw
0
210
The Power of 2
igorw
0
370
LISP 1.5 Programmer's Manual: A Dramatic Reading
igorw
0
520
The Moral Character of Software
igorw
1
340
interdisciplinary computing (domcode)
igorw
0
340
miniKanren (clojure berlin)
igorw
1
360
Other Decks in Programming
See All in Programming
protojson における文字化けの扱い
kazuki1023
0
450
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
380
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
270
Debian JP Projectのサーバー構成
uwabami
1
140
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
490
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
150
Spec-driven Development with AI
simas
PRO
0
2.3k
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
120
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
390
Getting Started with Vibe Coding
miccheng
0
240
小さなアプリを作って公開するまで
onozaty
0
200
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
380
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
750
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.8k
Why Our Code Smells
bkeepers
PRO
340
58k
The Language of Interfaces
destraynor
162
27k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
It's Worth the Effort
3n
188
29k
The Curious Case for Waylosing
cassininazir
1
620
Making Projects Easy
brettharned
120
6.9k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
4 Signs Your Business is Dying
shpigford
187
23k
Mind Mapping
helmedeiros
1
440
Context Engineering - Making Every Token Count
addyosmani
9
1.3k