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
Stack (sfugzh)
Search
Igor Wiedler
October 02, 2013
Programming
2
8.3k
Stack (sfugzh)
Short stack introduction at the symfony usergroup zürich.
Igor Wiedler
October 02, 2013
Tweet
Share
More Decks by Igor Wiedler
See All by Igor Wiedler
Redis Bedtime Stories
igorw
1
300
Wide Event Analytics (LISA19)
igorw
4
920
a day in the life of a request
igorw
0
130
production: an owner's manual
igorw
0
160
The Power of 2
igorw
0
290
LISP 1.5 Programmer's Manual: A Dramatic Reading
igorw
0
410
The Moral Character of Software
igorw
1
270
interdisciplinary computing (domcode)
igorw
0
280
miniKanren (clojure berlin)
igorw
1
290
Other Decks in Programming
See All in Programming
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
170
オープンセミナー2025@広島LT技術ブログを続けるには
satoshi256kbyte
0
160
Langfuseと歩む生成AI活用推進
licux
3
330
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
210
More Approvers for Greater OSS and Japan Community
tkikuc
1
110
AIでLINEスタンプを作ってみた
eycjur
1
220
旅行プランAIエージェント開発の裏側
ippo012
2
850
速いWebフレームワークを作る
yusukebe
5
1.7k
Claude Codeで実装以外の開発フロー、どこまで自動化できるか?失敗と成功
ndadayo
4
1.9k
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
420
MLH State of the League: 2026 Season
theycallmeswift
0
220
The state patternの実践 個人開発で培ったpractice集
miyanokomiya
0
160
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
GraphQLとの向き合い方2022年版
quramy
49
14k
How GitHub (no longer) Works
holman
315
140k
Code Reviewing Like a Champion
maltzj
525
40k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
840
Thoughts on Productivity
jonyablonski
70
4.8k
Navigating Team Friction
lara
189
15k
Transcript
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