diff --git a/create_framework/dependency-injection.rst b/create_framework/dependency-injection.rst index 86e6b6d78cf..39eaae4702e 100644 --- a/create_framework/dependency-injection.rst +++ b/create_framework/dependency-injection.rst @@ -132,7 +132,7 @@ them. Objects will be created on-demand when you access them from the container or when the container needs them to create other objects. For instance, to create the router listener, we tell Symfony that its class -name is ``Symfony\Component\HttpKernel\EventListener\RouterListener``, and +name is ``Symfony\Component\HttpKernel\EventListener\RouterListener`` and that its constructor takes a matcher object (``new Reference('matcher')``). As you can see, each object is referenced by a name, a string that uniquely identifies each object. The name allows us to get an object and to reference diff --git a/create_framework/event-dispatcher.rst b/create_framework/event-dispatcher.rst index ac9a465fd8e..d2b062e415b 100644 --- a/create_framework/event-dispatcher.rst +++ b/create_framework/event-dispatcher.rst @@ -154,7 +154,7 @@ event (``response``); the event name must be the same as the one used in the ``dispatch()`` call. In the listener, we add the Google Analytics code only if the response is not -a redirection, if the requested format is HTML, and if the response content +a redirection, if the requested format is HTML and if the response content type is HTML (these conditions demonstrate the ease of manipulating the Request and Response data from your code). diff --git a/create_framework/front-controller.rst b/create_framework/front-controller.rst index dcff8303f37..0e140393dfa 100644 --- a/create_framework/front-controller.rst +++ b/create_framework/front-controller.rst @@ -57,7 +57,7 @@ And for the "Goodbye" page:: We have indeed moved most of the shared code into a central place, but it does not feel like a good abstraction, does it? We still have the ``send()`` method -for all pages, our pages do not look like templates, and we are still not able +for all pages, our pages do not look like templates and we are still not able to test this code properly. Moreover, adding a new page means that we need to create a new PHP script, diff --git a/create_framework/http-foundation.rst b/create_framework/http-foundation.rst index 261821879b1..fcaa6c005b2 100644 --- a/create_framework/http-foundation.rst +++ b/create_framework/http-foundation.rst @@ -299,7 +299,7 @@ the wheel. I've almost forgot to talk about one added benefit: using the HttpFoundation component is the start of better interoperability between all frameworks and applications using it (like `Symfony`_, `Drupal 8`_, `phpBB 4`_, `ezPublish -5`_, `Laravel`_, `Silex`_, and `more`_). +5`_, `Laravel`_, `Silex`_ and `more`_). .. _`Twig`: http://twig.sensiolabs.org/ .. _`HTTP specification`: http://tools.ietf.org/wg/httpbis/ diff --git a/create_framework/http-kernel-httpkernel-class.rst b/create_framework/http-kernel-httpkernel-class.rst index eb3b8cf7741..ab0663dcbce 100644 --- a/create_framework/http-kernel-httpkernel-class.rst +++ b/create_framework/http-kernel-httpkernel-class.rst @@ -11,7 +11,7 @@ There should be an easier way, right? Enter the ``HttpKernel`` class. Instead of solving the same problem over and over again and instead of reinventing the wheel each time, the ``HttpKernel`` -class is a generic, extensible, and flexible implementation of +class is a generic, extensible and flexible implementation of ``HttpKernelInterface``. This class is very similar to the framework class we have written so far: it diff --git a/create_framework/routing.rst b/create_framework/routing.rst index 7d84622e4c0..01350294212 100644 --- a/create_framework/routing.rst +++ b/create_framework/routing.rst @@ -82,7 +82,7 @@ of default values for route attributes (``array('name' => 'World')``). :doc:`Routing component documentation ` to learn more about its many features like URL generation, attribute requirements, HTTP method enforcements, loaders for YAML or XML files, - dumpers to PHP or Apache rewrite rules for enhanced performance, and much + dumpers to PHP or Apache rewrite rules for enhanced performance and much more. Based on the information stored in the ``RouteCollection`` instance, a diff --git a/create_framework/separation-of-concerns.rst b/create_framework/separation-of-concerns.rst index d7bb049970c..8eba278c6da 100644 --- a/create_framework/separation-of-concerns.rst +++ b/create_framework/separation-of-concerns.rst @@ -8,7 +8,7 @@ class. It would bring us better *reusability* and easier testing to name just a few benefits. If you have a closer look at the code, ``front.php`` has one input, the -Request, and one output, the Response. Our framework class will follow this +Request and one output, the Response. Our framework class will follow this simple principle: the logic is about creating the Response associated with a Request. diff --git a/create_framework/templating.rst b/create_framework/templating.rst index a6d55350f78..5fa4b4bc468 100644 --- a/create_framework/templating.rst +++ b/create_framework/templating.rst @@ -50,7 +50,7 @@ rendered:: As ``render_template`` is used as an argument to the PHP ``call_user_func()`` function, we can replace it with any valid PHP `callbacks`_. This allows us to -use a function, an anonymous function, or a method of a class as a +use a function, an anonymous function or a method of a class as a controller... your choice. As a convention, for each route, the associated controller is configured via