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.2k
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
260
Wide Event Analytics (LISA19)
igorw
4
900
a day in the life of a request
igorw
0
110
production: an owner's manual
igorw
0
140
The Power of 2
igorw
0
260
LISP 1.5 Programmer's Manual: A Dramatic Reading
igorw
0
380
The Moral Character of Software
igorw
1
250
interdisciplinary computing (domcode)
igorw
0
260
miniKanren (clojure berlin)
igorw
1
250
Other Decks in Programming
See All in Programming
DRFを少しずつ オニオンアーキテクチャに寄せていく DjangoCongress JP 2025
nealle
2
260
楽しく向き合う例外対応
okutsu
0
580
もう少しテストを書きたいんじゃ〜 #phpstudy
o0h
PRO
16
3.6k
Ruby on cygwin 2025-02
fd0
0
180
Code smarter, not harder - How AI Coding Tools Boost Your Productivity | Angular Meetup Berlin
danielsogl
0
100
バッチを作らなきゃとなったときに考えること
irof
2
510
Open source software: how to live long and go far
gaelvaroquaux
0
660
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
210
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
170
Jakarta EE meets AI
ivargrimstad
0
260
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
120
Bedrock Agentsレスポンス解析によるAgentのOps
licux
3
910
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Designing for humans not robots
tammielis
250
25k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Gamification - CAS2011
davidbonilla
80
5.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
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