phpBB4 meets Symfony2
      Fabien Potencier
symfony 1 vs Symfony2
MVC
namespace ApplicationHelloBundleController;
use SymfonyBundleFrameworkBundleController;

class HelloController extends Con...
<?php $view->extend('HelloBundle::layout') ?>

Hello <?php echo $name ?>!
<html>
    <head>
         <title>
           <?php $view['slots']->output('title') ?>
         </title>
    </head>
    <...
title

         Lorem	
  ipsum	
  dolor	
  sit	
  amet,	
  consectetur	
  adipiscing	
  elit.	
  In	
  vel	
  
           ...
{% extends "HelloBundle::layout" %}

{% block content %}
    Hello {{ name }}!
{% endblock %}
<html>
    <head>
        <title>
           {% block title %}{% endblock %}
        </title>
    </head>
    <body>
     ...
Routing
/blog.php?section=symfony&article_id=18475
web/
  index.php
/index.php/blog/2010/08/21/symfony2-meets-phpBB4
/blog/2010/08/21/symfony2-meets-phpBB4
/blog/:year/:month/:day/:slug
post:
    pattern: /blog/:year/:month/:day/:slug
    defaults:
      { _controller: BlogBundle:Post:show }
<routes>
    <route
      id="post"
      pattern="/blog/:year/:month/:day/:slug">
      <default key="_controller">
     ...
use SymfonyComponentRoutingRouteCollection;
use SymfonyComponentRoutingRoute;

$collection = new RouteCollection();

$rout...
$router
  ->match('/blog/2010/08/21/sf2-meets-phpBB4')



$router
  ->generate('post', array('slug' => '...'))
post:
    pattern: /post/:slug
    defaults:
      { _controller: BlogBundle:Post:show }
$router
  ->generate('post', array('slug' => '...'))
Bundles
.../
  SomeBundle/
     Controller/
     Entity/
     Resources/
       config/
       views/
     SomeBundle.php
     Tes...
public function registerBundleDirs()
{
  return array(
     'Application'    => __DIR__.'/../src/Application',
     'Bundl...
$this->render('SomeBundle:Hello:index', $params)
hello:
  pattern: /hello/:name
  defaults: { _controller: SomeBundle:... }
SomeBundle can be any of


ApplicationSomeBundle
BundleSomeBundle
SymfonyBundleSomeBundle
Environments
Developers     Customer     End Users




Development     Staging      Production
Environment   Environment   Environment
cache         cache          cache

  debug	
       debug	
        debug	
  

   logs	
        logs	
         logs	
  

  ...
# config/config.yml
doctrine.dbal:
    dbname:    mydbname
    user:      root
    password: %doctrine.dbal_password%

swi...
# config/config_dev.yml
imports:
    - { resource: config.yml }

zend.logger:
    priority: debug
    path:     %kernel.ro...
# Doctrine Configuration
doctrine.dbal:
    dbname:    xxxxxxxx
    user:      xxxxxxxx
    password: ~

# Swiftmailer Con...
<!-- Doctrine Configuration -->
<doctrine:dbal dbname="xxxxxxxx" user="xxxxxxxx"
password="" />
<doctrine:orm />

<!-- Swi...
// Doctrine Configuration
$container->loadFromExtension('doctrine', 'dbal', array(
    'dbname'   => 'xxxxxxxx',
    'user...
Developer Tools
INFO: Matched route "blog_home" (parameters: array ( '_bundle' =>
'BlogBundle', '_controller' => 'Post', '_action' => 'ind...
INFO: Matched route "blog_post" (parameters: array ( '_bundle' =>
'BlogBundle', '_controller' => 'Post', '_action' => 'sho...
DEBUG: Notifying (until) event "core.request" to listener "(SymfonyFrameworkWebBundleListenerRequestParser, resolve)"
INFO...
Security
XSS / CSRF / SQL Injection
<doctrine:dbal
   dbname="sfweb"
   username="root"
   password="SuperSecretPasswordThatAnyoneCanSee"
/>
in a .htaccess or httpd.conf file
SetEnv SYMFONY__DOCTRINE__DBAL__PASSWORD "foobar"
                        %doctrine.dbal....
<doctrine:dbal
   dbname="sfweb"
   username="root"
   password="%doctrine.dbal.password%"
/>
Functional Tests
$client = $this->createClient();

$crawler = $client->request(
  'GET', '/hello/Fabien');

$this->assertTrue($crawler->fil...
$this->assertEquals(
  10,
  $crawler->filter('div.hentry')->count());

$this->assertTrue(
  $client->getResponse()->isSuc...
$crawler = $client->request(
   'GET', 'hello/Lucas'
);
$link = $crawler->selectLink("Greet Lucas");

$client->click($link);
$form = $crawler->selectButton('submit');

$client->submit($form, array(
    'name'         => 'Lucas',
    'country'     ...
$harry = $this->createClient();
$sally = $this->createClient();

$harry->request('POST', '/say/sally/Hello');
$sally->requ...
$harry = $this->createClient();
$sally = $this->createClient();

$harry->insulate();
$sally->insulate();

$harry->request(...
Caching
cacheable for 10 seconds
                                                                            cacheable for 5 secon...
cacheable for 10 seconds

<?php $view->extend('...:layout') ?>

<?php $view['slots']->start('sidebar') ?> 5 seconds
      ...
$view['actions']->render('...:list', array(
   'standalone' => true,
))
Lorem	
  ipsum	
  dolor	
  sit	
  amet,	
  consectetur	
              Lorem	
  ipsum	
  dolor	
  sit	
  
adipiscing	
  eli...
<esi:include src="..." />
Lorem	
  ipsum	
  dolor	
  sit	
  amet,	
  consectetur	
  
adipiscing	
  elit.	
  In	
  vel	
  n...
ESI… or Edge Side Includes
Lorem	
  ipsum	
  
                                                                      dolor	
  sit	
  
                ...
Web Server




                      Symfony2
                        app
Requests




           Response
Web Server

               Symfony2 HTTP proxy


                      Symfony2
                        app
Requests




 ...
Reverse proxy

                      Web Server




                      Symfony2
                        app
Requests


...
HttpKernel: The framework construction kit
namespace SymfonyComponentHttpKernel;
interface HttpKernelInterface
{
  const MASTER_REQUEST = 1;
  const SUB_REQUEST = 2;...
Request


      core.request


           getController()


      core.controller


           getArguments()


      core...
Request


      core.request


           getController()


      core.controller


           getArguments()


      core...
Request


      core.request


           getController()


      core.controller
                             core.except...
SwiftmailerBundle     DoctrineBundle


                                 ZendBundle               ...


             Framew...
MOD author
Theme author
Core Developer
End Users
Everybody
Questions?
PhpBB meets Symfony2
PhpBB meets Symfony2
Upcoming SlideShare
Loading in...5
×

PhpBB meets Symfony2

9,555

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
9,555
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
58
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

PhpBB meets Symfony2

  1. 1. phpBB4 meets Symfony2 Fabien Potencier
  2. 2. symfony 1 vs Symfony2
  3. 3. MVC
  4. 4. namespace ApplicationHelloBundleController; use SymfonyBundleFrameworkBundleController; class HelloController extends Controller { public function indexAction($name) { // Get things from the Model return $this->render( 'HelloBundle:Hello:index', array('name' => $name) ); } }
  5. 5. <?php $view->extend('HelloBundle::layout') ?> Hello <?php echo $name ?>!
  6. 6. <html> <head> <title> <?php $view['slots']->output('title') ?> </title> </head> <body> <?php $view['slots']->output('_content') ?> </body> </html>
  7. 7. title Lorem  ipsum  dolor  sit  amet,  consectetur  adipiscing  elit.  In  vel   _content Lorem  ipsum  dolor  sit  amet,  consectetur  adipiscing  elit.  In  vel  nulla  arcu,   vitae  cursus  nunc.  Integer  semper  turpis  et  enim  por6tor  iaculis.  Nulla   facilisi.  Lorem  ipsum  dolor  sit  amet,  consectetur  adipiscing  elit.  Mauris   vehicula  ves;bulum  dictum.  Aenean  non  velit  tortor.  Nullam  adipiscing   malesuada  aliquam.  Mauris  dignissim,  urna  quis  iaculis  tempus,  justo   layout libero  por6tor  est,  nec  eleifend  est  elit  vitae  ante.  Curabitur  interdum   luctus  metus,  in  pulvinar  lectus  rutrum  sit  amet.  Duis  gravida,  metus  in   dictum  eleifend,  dolor  risus  ;ncidunt  ligula,  non  volutpat  nulla  sapien  in   elit.  Nulla  rutrum  erat  id  neque  suscipit  eu  ultricies  odio  sollicitudin.   Aliquam  a  mi  vel  eros  placerat  hendrerit.  Phasellus  por6tor,  augue  sit   amet  vulputate  venena;s,  dui  leo  commodo  odio,  a  euismod  turpis   ligula  in  elit.     slot
  8. 8. {% extends "HelloBundle::layout" %} {% block content %} Hello {{ name }}! {% endblock %}
  9. 9. <html> <head> <title> {% block title %}{% endblock %} </title> </head> <body> {% block body %}{% endblock %} </body> </html>
  10. 10. Routing
  11. 11. /blog.php?section=symfony&article_id=18475
  12. 12. web/ index.php
  13. 13. /index.php/blog/2010/08/21/symfony2-meets-phpBB4
  14. 14. /blog/2010/08/21/symfony2-meets-phpBB4
  15. 15. /blog/:year/:month/:day/:slug
  16. 16. post: pattern: /blog/:year/:month/:day/:slug defaults: { _controller: BlogBundle:Post:show }
  17. 17. <routes> <route id="post" pattern="/blog/:year/:month/:day/:slug"> <default key="_controller"> BlogBundle:Post:show </default> </route> </routes>
  18. 18. use SymfonyComponentRoutingRouteCollection; use SymfonyComponentRoutingRoute; $collection = new RouteCollection(); $route = new Route( '/blog/:year/:month/:day/:slug', array('_controller' => 'BlogBundle:Post:show')); $collection->addRoute('post', $route); return $collection;
  19. 19. $router ->match('/blog/2010/08/21/sf2-meets-phpBB4') $router ->generate('post', array('slug' => '...'))
  20. 20. post: pattern: /post/:slug defaults: { _controller: BlogBundle:Post:show }
  21. 21. $router ->generate('post', array('slug' => '...'))
  22. 22. Bundles
  23. 23. .../ SomeBundle/ Controller/ Entity/ Resources/ config/ views/ SomeBundle.php Tests/
  24. 24. public function registerBundleDirs() { return array( 'Application' => __DIR__.'/../src/Application', 'Bundle' => __DIR__.'/../src/Bundle', 'SymfonyBundle' => __DIR__.'/../src/vendor/symfony/ src/Symfony/Bundle', ); }
  25. 25. $this->render('SomeBundle:Hello:index', $params)
  26. 26. hello: pattern: /hello/:name defaults: { _controller: SomeBundle:... }
  27. 27. SomeBundle can be any of ApplicationSomeBundle BundleSomeBundle SymfonyBundleSomeBundle
  28. 28. Environments
  29. 29. Developers Customer End Users Development Staging Production Environment Environment Environment
  30. 30. cache cache cache debug   debug   debug   logs   logs   logs   stats stats stats Development Staging Production Environment Environment Environment
  31. 31. # config/config.yml doctrine.dbal: dbname: mydbname user: root password: %doctrine.dbal_password% swift.mailer: transport: smtp host: localhost
  32. 32. # config/config_dev.yml imports: - { resource: config.yml } zend.logger: priority: debug path: %kernel.root_dir%/logs/%kernel.environment%.log doctrine.dbal: password: ~ swift.mailer: transport: gmail username: xxxxxxxx password: xxxxxxxx
  33. 33. # Doctrine Configuration doctrine.dbal: dbname: xxxxxxxx user: xxxxxxxx password: ~ # Swiftmailer Configuration swift.mailer: transport: smtp encryption: ssl auth_mode: login host: smtp.gmail.com username: xxxxxxxx password: xxxxxxxx
  34. 34. <!-- Doctrine Configuration --> <doctrine:dbal dbname="xxxxxxxx" user="xxxxxxxx" password="" /> <doctrine:orm /> <!-- Swiftmailer Configuration --> <swift:mailer transport="smtp" encryption="ssl" auth_mode="login" host="smtp.gmail.com" username="xxxxxxxx" password="xxxxxxxx" />
  35. 35. // Doctrine Configuration $container->loadFromExtension('doctrine', 'dbal', array( 'dbname' => 'xxxxxxxx', 'user' => 'xxxxxxxx', 'password' => '', )); $container->loadFromExtension('doctrine', 'orm'); // Swiftmailer Configuration $container->loadFromExtension('swift', 'mailer', array( 'transport' => "smtp", 'encryption' => "ssl", 'auth_mode' => "login", 'host' => "smtp.gmail.com", 'username' => "xxxxxxxx", 'password' => "xxxxxxxx", ));
  36. 36. Developer Tools
  37. 37. INFO: Matched route "blog_home" (parameters: array ( '_bundle' => 'BlogBundle', '_controller' => 'Post', '_action' => 'index', '_route' => 'blog_home',)) INFO: Using controller "BundleBlogBundleController PostController::indexAction" INFO: SELECT s0_.id AS id0, s0_.title AS title1, s0_.html_body AS html_body2, s0_.excerpt AS excerpt3, s0_.published_at AS published_at4 FROM sf_weblog_post s0_ ORDER BY s0_.published_at DESC LIMIT 10 (array ())
  38. 38. INFO: Matched route "blog_post" (parameters: array ( '_bundle' => 'BlogBundle', '_controller' => 'Post', '_action' => 'show', '_format' => 'html', 'id' => '3456', '_route' => 'blog_post',)) INFO: Using controller "BundleBlogBundleController PostController::showAction » INFO: SELECT s0_.id AS id0, s0_.title AS title1, s0_.html_body AS html_body2, s0_.excerpt AS excerpt3, s0_.published_at AS published_at4 FROM sf_weblog_post s0_ WHERE s0_.id = ? (array ( 0 => '3456',)) ERR: Post "3456" not found! (No result was found for query although at least one row was expected.) (uncaught SymfonyComponentsRequestHandlerException NotFoundHttpException exception) INFO: Using controller "SymfonyFrameworkWebBundleController ExceptionController::exceptionAction"
  39. 39. DEBUG: Notifying (until) event "core.request" to listener "(SymfonyFrameworkWebBundleListenerRequestParser, resolve)" INFO: Matched route "blog_post" (parameters: array ( '_bundle' => 'BlogBundle', '_controller' => 'Post', '_action' => 'show', '_format' => 'html', 'id' => '3456', '_route' => 'blog_post',)) DEBUG: Notifying (until) event "core.load_controller" to listener "(SymfonyFrameworkWebBundleListenerControllerLoader, resolve)" INFO: Using controller "BundleBlogBundleControllerPostController::showAction" DEBUG: Listener "(SymfonyFrameworkWebBundleListenerControllerLoader, resolve)" processed the event "core.load_controller" INFO: Trying to get post "3456" from database INFO: SELECT s0_.id AS id0, s0_.title AS title1, s0_.html_body AS html_body2, s0_.excerpt AS excerpt3, s0_.published_at AS published_at4 FROM sf_weblog_post s0_ WHERE s0_.id = ? (array ( 0 => '3456',)) DEBUG: Notifying (until) event "core.exception" to listener "(SymfonyFrameworkWebBundleListenerExceptionHandler, handle)" ERR: Post "3456" not found! (No result was found for query although at least one row was expected.) (uncaught SymfonyComponents RequestHandlerExceptionNotFoundHttpException exception) DEBUG: Notifying (until) event "core.request" to listener "(SymfonyFrameworkWebBundleListenerRequestParser, resolve)" DEBUG: Notifying (until) event "core.load_controller" to listener "(SymfonyFrameworkWebBundleListenerControllerLoader, resolve)" INFO: Using controller "SymfonyFrameworkWebBundleControllerExceptionController::exceptionAction" DEBUG: Listener "(SymfonyFrameworkWebBundleListenerControllerLoader, resolve)" processed the event "core.load_controller" DEBUG: Notifying (filter) event "core.response" to listener "(SymfonyFrameworkWebBundleListenerResponseFilter, filter)" DEBUG: Notifying (filter) event "core.response" to listener "(SymfonyFrameworkWebBundleDebugDataCollector DataCollectorManager, handle)" DEBUG: Notifying (filter) event "core.response" to listener "(SymfonyFrameworkWebBundleDebugWebDebugToolbar, handle)" DEBUG: Listener "(SymfonyFrameworkWebBundleListenerExceptionHandler, handle)" processed the event "core.exception" DEBUG: Notifying (filter) event "core.response" to listener "(SymfonyFrameworkWebBundleListenerResponseFilter, filter)" DEBUG: Notifying (filter) event "core.response" to listener "(SymfonyFrameworkWebBundleDebugDataCollector DataCollectorManager, handle)" DEBUG: Notifying (filter) event "core.response" to listener "(SymfonyFrameworkWebBundleDebugWebDebugToolbar, handle)"
  40. 40. Security
  41. 41. XSS / CSRF / SQL Injection
  42. 42. <doctrine:dbal dbname="sfweb" username="root" password="SuperSecretPasswordThatAnyoneCanSee" />
  43. 43. in a .htaccess or httpd.conf file SetEnv SYMFONY__DOCTRINE__DBAL__PASSWORD "foobar" %doctrine.dbal.password%
  44. 44. <doctrine:dbal dbname="sfweb" username="root" password="%doctrine.dbal.password%" />
  45. 45. Functional Tests
  46. 46. $client = $this->createClient(); $crawler = $client->request( 'GET', '/hello/Fabien'); $this->assertTrue($crawler->filter( 'html:contains("Hello Fabien")')->count());
  47. 47. $this->assertEquals( 10, $crawler->filter('div.hentry')->count()); $this->assertTrue( $client->getResponse()->isSuccessful());
  48. 48. $crawler = $client->request( 'GET', 'hello/Lucas' );
  49. 49. $link = $crawler->selectLink("Greet Lucas"); $client->click($link);
  50. 50. $form = $crawler->selectButton('submit'); $client->submit($form, array( 'name' => 'Lucas', 'country' => 'France', 'like_symfony' => true, 'photo' => '/path/to/lucas.jpg', ));
  51. 51. $harry = $this->createClient(); $sally = $this->createClient(); $harry->request('POST', '/say/sally/Hello'); $sally->request('GET', '/messages'); $this->assertEquals(201, $harry->getResponse()->getStatusCode()); $this->assertRegExp('/Hello/', $sally->getResponse()->getContent());
  52. 52. $harry = $this->createClient(); $sally = $this->createClient(); $harry->insulate(); $sally->insulate(); $harry->request('POST', '/say/sally/Hello'); $sally->request('GET', '/messages'); $this->assertEquals(201, $harry->getResponse()->getStatusCode()); $this->assertRegExp('/Hello/', $sally->getResponse()->getContent());
  53. 53. Caching
  54. 54. cacheable for 10 seconds cacheable for 5 seconds Lorem  ipsum  dolor  sit  amet,  consectetur   Lorem  ipsum  dolor  sit   layout adipiscing  elit.  In  vel  nulla  arcu,  vitae   amet,  consectetur   cursus  nunc.  Integer  semper  turpis  et  enim   adipiscing  elit.  In  vel  nulla   por6tor  iaculis.  Nulla  facilisi.  Lorem  ipsum   arcu,  vitae  cursus  nunc.   dolor  sit  amet,  consectetur  adipiscing  elit.   Integer  semper  turpis  et   Mauris  vehicula  ves;bulum  dictum.   enim  por6tor  iaculis.   Aenean  non  velit  tortor.  Nullam  adipiscing   Nulla  facilisi.  Lorem  ipsum   malesuada  aliquam.  Mauris  dignissim,  urna   dolor  sit  amet,   quis  iaculis  tempus,  justo  libero  por6tor   consectetur  adipiscing  elit.   est,  nec  eleifend  est  elit  vitae  ante.   Mauris  vehicula   Curabitur  interdum  luctus  metus,  in   ves;bulum  dictum.   pulvinar  lectus  rutrum  sit  amet.  Duis   Aenean  non  velit  tortor.   gravida,  metus  in  dictum  eleifend,  dolor   Nullam  adipiscing   risus  ;ncidunt  ligula,  non  volutpat  nulla   malesuada  aliquam.   sapien  main Nulla  rutrum  erat  id  neque   in  elit.   Mauris  embeddedurna   dignissim,   suscipit  eu  ultricies  odio  sollicitudin.   controller quis  iaculis  tempus,  justo   controller Aliquam  a  mi  vel  eros  placerat  hendrerit.   libero  por6tor  est,  nec   Phasellus  por6tor,  augue  sit  amet   eleifend  est  elit  vitae  ante.   vulputate  venena;s,  dui  leo  commodo   Curabitur  interdum  luctus   odio,  a  euismod  turpis  ligula  in  elit.     metus.  
  55. 55. cacheable for 10 seconds <?php $view->extend('...:layout') ?> <?php $view['slots']->start('sidebar') ?> 5 seconds cacheable for <?php echo $view['actions']->render('...:list') ?> <?php $view['slots']->stop() ?>
  56. 56. $view['actions']->render('...:list', array( 'standalone' => true, ))
  57. 57. Lorem  ipsum  dolor  sit  amet,  consectetur   Lorem  ipsum  dolor  sit   adipiscing  elit.  In  vel  nulla  arcu,  vitae   amet,  consectetur   cursus  nunc.  Integer  semper  turpis  et  enim   adipiscing  elit.  In  vel  nulla   por6tor  iaculis.  Nulla  facilisi.  Lorem  ipsum   arcu,  vitae  cursus  nunc.   dolor  sit  amet,  consectetur  adipiscing  elit.   Integer  semper  turpis  et   Mauris  vehicula  ves;bulum  dictum.   enim  por6tor  iaculis.   Aenean  non  velit  tortor.  Nullam  adipiscing   Nulla  facilisi.  Lorem  ipsum   malesuada  aliquam.  Mauris  dignissim,  urna   dolor  sit  amet,   quis  iaculis  tempus,  justo  libero  por6tor   consectetur  adipiscing  elit.   est,  nec  eleifend  est  elit  vitae  ante.   Mauris  vehicula   Curabitur  interdum  luctus  metus,  in   ves;bulum  dictum.   pulvinar  lectus  rutrum  sit  amet.  Duis   Aenean  non  velit  tortor.   gravida,  metus  in  dictum  eleifend,  dolor   Nullam  adipiscing   risus  ;ncidunt  ligula,  non  volutpat  nulla   malesuada  aliquam.   sapien  in  elit.  Nulla  rutrum  erat  id  neque   Mauris  dignissim,  urna   suscipit  eu  ultricies  odio  sollicitudin.   quis  iaculis  tempus,  justo   Aliquam  a  mi  vel  eros  placerat  hendrerit.   libero  por6tor  est,  nec   Phasellus  por6tor,  augue  sit  amet   eleifend  est  elit  vitae  ante.   vulputate  venena;s,  dui  leo  commodo   Curabitur  interdum  luctus   odio,  a  euismod  turpis  ligula  in  elit.     metus.  
  58. 58. <esi:include src="..." /> Lorem  ipsum  dolor  sit  amet,  consectetur   adipiscing  elit.  In  vel  nulla  arcu,  vitae   cursus  nunc.  Integer  semper  turpis  et  enim   por6tor  iaculis.  Nulla  facilisi.  Lorem  ipsum   dolor  sit  amet,  consectetur  adipiscing  elit.   Mauris  vehicula  ves;bulum  dictum.   Aenean  non  velit  tortor.  Nullam  adipiscing   malesuada  aliquam.  Mauris  dignissim,  urna   quis  iaculis  tempus,  justo  libero  por6tor   est,  nec  eleifend  est  elit  vitae  ante.   Curabitur  interdum  luctus  metus,  in   pulvinar  lectus  rutrum  sit  amet.  Duis   gravida,  metus  in  dictum  eleifend,  dolor   risus  ;ncidunt  ligula,  non  volutpat  nulla   sapien  in  elit.  Nulla  rutrum  erat  id  neque   suscipit  eu  ultricies  odio  sollicitudin.   Aliquam  a  mi  vel  eros  placerat  hendrerit.   Phasellus  por6tor,  augue  sit  amet   vulputate  venena;s,  dui  leo  commodo   odio,  a  euismod  turpis  ligula  in  elit.    
  59. 59. ESI… or Edge Side Includes
  60. 60. Lorem  ipsum   dolor  sit   amet,     1 2 Symfony2 Application Lorem   ipsum   Reverse Proxy dolor   Client 3 Lorem  ipsum   Lorem   dolor  sit   ipsum   amet,     dolor   4
  61. 61. Web Server Symfony2 app Requests Response
  62. 62. Web Server Symfony2 HTTP proxy Symfony2 app Requests Response
  63. 63. Reverse proxy Web Server Symfony2 app Requests Response
  64. 64. HttpKernel: The framework construction kit
  65. 65. namespace SymfonyComponentHttpKernel; interface HttpKernelInterface { const MASTER_REQUEST = 1; const SUB_REQUEST = 2; public function handle( Request $request = null, $type = self::MASTER_REQUEST, $raw = false); }
  66. 66. Request core.request getController() core.controller getArguments() core.view core.response Response
  67. 67. Request core.request getController() core.controller getArguments() core.view core.response Response
  68. 68. Request core.request getController() core.controller core.exception getArguments() core.view core.response Response
  69. 69. SwiftmailerBundle DoctrineBundle ZendBundle ... FrameworkBundle TwigBundle Bundles Framework Components HttpKernel DependencyInjection Console Routing Templating HttpFoundation Event Dispatcher ...
  70. 70. MOD author
  71. 71. Theme author
  72. 72. Core Developer
  73. 73. End Users
  74. 74. Everybody
  75. 75. Questions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×