Skip to content

Commit 723653f

Browse files
committed
Implemented most of the changes suggested by reviewers
1 parent c64ea2d commit 723653f

File tree

3 files changed

+26
-25
lines changed

3 files changed

+26
-25
lines changed

cookbook/profiler/profiling_data.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@ When the response object is available, use the
1212
:method:`Symfony\\Component\\HttpKernel\\Profiler\\Profiler::loadProfileFromResponse`
1313
method to access to its associated profile::
1414

15-
$profile = $container->get('profiler')->loadProfileFromResponse($response);
15+
// ... $profiler is the 'profiler' service
16+
$profile = $profiler->loadProfileFromResponse($response);
1617

1718
When the profiler stores data about a request, it also associates a token with it;
1819
this token is available in the ``X-Debug-Token`` HTTP header of the response.
1920
Using this token, you can access the profile of any past response thanks to the
2021
:method:`Symfony\\Component\\HttpKernel\\Profiler\\Profiler::loadProfile` method::
2122

22-
$token = $request->headers->get(X-Debug-Token);
23+
$token = $request->headers->get('X-Debug-Token');
2324
$profile = $container->get('profiler')->loadProfile($token);
2425

2526
.. tip::
2627

27-
When the profiler is enabled but not the web debug toolbar, use a tool like
28-
Firebug to get the value of the ``X-Debug-Token`` HTTP header.
28+
When the profiler is enabled but not the web debug toolbar, use your browser
29+
inspection tools to get the value of the ``X-Debug-Token`` HTTP header.
2930

3031
The ``profiler`` service also provides the
3132
:method:`Symfony\\Component\\HttpKernel\\Profiler\\Profiler::find` method to

glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Glossary
110110
The *Kernel* is the core of Symfony. The Kernel object handles HTTP
111111
requests using all the bundles and libraries registered to it. See
112112
:ref:`The Architecture: The Application Directory <the-app-dir>` and the
113-
:doc:`Internal Events Reference </reference/events.rst>`.
113+
:doc:`Internal Events Reference </reference/events>`.
114114

115115
Firewall
116116
In Symfony, a *Firewall* doesn't have to do with networking. Instead,

reference/events.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Symfony Framework Events
44
Kernel Events
55
-------------
66

7-
Each event thrown by the Kernel is a subclass of
7+
Each event dispatched by the kernel is a subclass of
88
:class:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent`. This means that
99
each event has access to the following information:
1010

@@ -20,10 +20,10 @@ each event has access to the following information:
2020

2121
.. _kernel-core-request:
2222

23-
``kernel.request`` Event
24-
~~~~~~~~~~~~~~~~~~~~~~~~
23+
``kernel.request``
24+
~~~~~~~~~~~~~~~~~~
2525

26-
*Event Class*: :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent`
26+
**Event Class**: :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent`
2727

2828
The goal of this event is to either return a ``Response`` object immediately
2929
or setup variables so that a Controller can be called after the event. Any
@@ -41,10 +41,10 @@ object to match the ``Request`` and determine the Controller name (stored in the
4141

4242
Read more on the :ref:`kernel.request event <component-http-kernel-kernel-request>`.
4343

44-
``kernel.controller`` Event
45-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
44+
``kernel.controller``
45+
~~~~~~~~~~~~~~~~~~~~~
4646

47-
*Event Class*: :class:`Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent`
47+
**Event Class**: :class:`Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent`
4848

4949
This event is not used by the FrameworkBundle, but can be an entry point used
5050
to modify the controller that should be executed::
@@ -64,10 +64,10 @@ to modify the controller that should be executed::
6464

6565
Read more on the :ref:`kernel.controller event <component-http-kernel-kernel-controller>`.
6666

67-
``kernel.view`` Event
68-
~~~~~~~~~~~~~~~~~~~~~
67+
``kernel.view``
68+
~~~~~~~~~~~~~~~
6969

70-
*Event Class*: :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent`
70+
**Event Class**: :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent`
7171

7272
This event is not used by the FrameworkBundle, but it can be used to implement
7373
a view sub-system. This event is called *only* if the Controller does *not*
@@ -85,7 +85,7 @@ method::
8585
$val = $event->getControllerResult();
8686
$response = new Response();
8787

88-
// ... some how customize the Response from the return value
88+
// ... somehow customize the Response from the return value
8989

9090
$event->setResponse($response);
9191
}
@@ -94,10 +94,10 @@ method::
9494

9595
Read more on the :ref:`kernel.view event <component-http-kernel-kernel-view>`.
9696

97-
``kernel.response`` Event
98-
~~~~~~~~~~~~~~~~~~~~~~~~~
97+
``kernel.response``
98+
~~~~~~~~~~~~~~~~~~~
9999

100-
*Event Class*: :class:`Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent`
100+
**Event Class**: :class:`Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent`
101101

102102
The purpose of this event is to allow other systems to modify or replace the
103103
``Response`` object after its creation::
@@ -128,10 +128,10 @@ The FrameworkBundle registers several listeners:
128128

129129
Read more on the :ref:`kernel.response event <component-http-kernel-kernel-response>`.
130130

131-
``kernel.terminate`` Event
132-
~~~~~~~~~~~~~~~~~~~~~~~~~~
131+
``kernel.terminate``
132+
~~~~~~~~~~~~~~~~~~~~
133133

134-
*Event Class*: :class:`Symfony\\Component\\HttpKernel\\Event\\PostResponseEvent`
134+
**Event Class**: :class:`Symfony\\Component\\HttpKernel\\Event\\PostResponseEvent`
135135

136136
The purpose of this event is to perform "heavier" tasks after the response
137137
was already served to the client.
@@ -142,10 +142,10 @@ was already served to the client.
142142

143143
.. _kernel-kernel.exception:
144144

145-
``kernel.exception`` Event
146-
~~~~~~~~~~~~~~~~~~~~~~~~~~
145+
``kernel.exception``
146+
~~~~~~~~~~~~~~~~~~~~
147147

148-
*Event Class*: :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent`
148+
**Event Class**: :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent`
149149

150150
The FrameworkBundle registers an
151151
:class:`Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener` that

0 commit comments

Comments
 (0)