From b1ea84f8e8a24125e2d3ffbf59307797aa0ba70f Mon Sep 17 00:00:00 2001 From: Luis Cordova Date: Sat, 30 Mar 2013 08:16:46 -0500 Subject: [PATCH] rewrite of internals advance sample on internals rewrite add links to components for foundation and kernel link more events and add link of missing terminate event keep `. + ``HttpKernel`` Component ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -58,6 +62,7 @@ Dependency Injection component and a powerful plugin system (bundles). .. seealso:: + Read more about the :doc:`HttpKernel Component `. Read more about :doc:`Dependency Injection ` and :doc:`Bundles `. @@ -234,6 +239,7 @@ add the following code at the beginning of your listener method:: :doc:`Event Dispatcher Component Documentation` section first. + .. index:: single: Event; kernel.request @@ -256,6 +262,10 @@ uses a :class:`Symfony\\Component\\Routing\\RouterInterface` object to match the ``Request`` and determine the Controller name (stored in the ``_controller`` ``Request`` attribute). +.. seealso:: + + Read more on the :ref:`kernel.request event `. + .. index:: single: Event; kernel.controller @@ -278,6 +288,10 @@ to modify the controller that should be executed:: $event->setController($controller); } +.. seealso:: + + Read more on the :ref:`kernel.controller event `. + .. index:: single: Event; kernel.view @@ -307,6 +321,10 @@ The value returned by the Controller is accessible via the $event->setResponse($response); } +.. seealso:: + + Read more on the :ref:`kernel.view event `. + .. index:: single: Event; kernel.response @@ -340,6 +358,24 @@ The ``FrameworkBundle`` registers several listeners: ``Surrogate-Control`` HTTP header when the Response needs to be parsed for ESI tags. +.. seealso:: + + Read more on the :ref:`kernel.response event `. + +.. index:: + single: Event; kernel.terminate + +``kernel.terminate`` Event +.......................... + +.. versionadded:: 2.1 + The ``kernel.terminate`` event is new since Symfony 2.1. + +.. seealso:: + + Read more on the :ref:`kernel.terminate event `. + + .. index:: single: Event; kernel.exception @@ -383,6 +419,10 @@ and set a new ``Exception`` object, or do nothing:: return new Response('Error', 404 /* ignored */, array('X-Status-Code' => 200)); +.. seealso:: + + Read more on the :ref:`kernel.exception event `. + .. index:: single: Event Dispatcher diff --git a/components/http_kernel/introduction.rst b/components/http_kernel/introduction.rst index 5822096e075..309b20b6a42 100644 --- a/components/http_kernel/introduction.rst +++ b/components/http_kernel/introduction.rst @@ -259,6 +259,8 @@ will be called after another event - ``kernel.controller`` - is dispatched. There are also a few other variations on the above process (e.g. if you're registering your controllers as services). +.. _component-http-kernel-kernel-controller: + 3) The ``kernel.controller`` event ---------------------------------- @@ -444,6 +446,8 @@ method, which sends the headers and prints the ``Response`` content. serializes the current user's information into the session so that it can be reloaded on the next request. +.. _component-http-kernel-kernel-terminate: + 8) The ``kernel.terminate`` event ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~