Skip to content

Commit 2370a69

Browse files
Changed uses of we in several cookbooks
1 parent 498510a commit 2370a69

22 files changed

+113
-113
lines changed

Diff for: cookbook/assetic/asset_management.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ and deployment processes.
173173

174174
To use a filter, you first need to specify it in the Assetic configuration.
175175
Adding a filter here doesn't mean it's being used - it just means that it's
176-
available to use (we'll use the filter below).
176+
available to use (you'll use the filter below).
177177

178178
For example to use the JavaScript YUI Compressor the following config should
179179
be added:

Diff for: cookbook/bundles/override.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ something beyond just the class name, you should use a compiler pass::
8484
}
8585
}
8686

87-
In this example we fetch the service definition of the original service, and set
88-
its class name to our own class.
87+
In this example you fetch the service definition of the original service, and set
88+
its class name to your own class.
8989

9090
See :doc:`/cookbook/service_container/compiler_passes` for information on how to use
9191
compiler passes. If you want to do something beyond just overriding the class -

Diff for: cookbook/configuration/apache_router.rst

+14-14
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ One of these ways is by letting apache handle routes directly, rather than using
1010
Change Router Configuration Parameters
1111
--------------------------------------
1212

13-
To dump Apache routes we must first tweak some configuration parameters to tell
13+
To dump Apache routes you must first tweak some configuration parameters to tell
1414
Symfony2 to use the ``ApacheUrlMatcher`` instead of the default one:
1515

1616
.. code-block:: yaml
17-
17+
1818
# app/config/config_prod.yml
1919
parameters:
2020
router.options.matcher.cache_class: ~ # disable router cache
@@ -26,27 +26,27 @@ Symfony2 to use the ``ApacheUrlMatcher`` instead of the default one:
2626
extends :class:`Symfony\\Component\\Routing\\Matcher\\UrlMatcher` so even
2727
if you don't regenerate the url_rewrite rules, everything will work (because
2828
at the end of ``ApacheUrlMatcher::match()`` a call to ``parent::match()``
29-
is done).
30-
29+
is done).
30+
3131
Generating mod_rewrite rules
3232
----------------------------
33-
33+
3434
To test that it's working, let's create a very basic route for demo bundle:
3535

3636
.. code-block:: yaml
37-
37+
3838
# app/config/routing.yml
3939
hello:
4040
pattern: /hello/{name}
4141
defaults: { _controller: AcmeDemoBundle:Demo:hello }
42-
43-
44-
Now we generate **url_rewrite** rules:
45-
42+
43+
44+
Now generate **url_rewrite** rules:
45+
4646
.. code-block:: bash
4747
4848
$ php app/console router:dump-apache -e=prod --no-debug
49-
49+
5050
Which should roughly output the following:
5151

5252
.. code-block:: apache
@@ -59,7 +59,7 @@ Which should roughly output the following:
5959
RewriteCond %{REQUEST_URI} ^/hello/([^/]+?)$
6060
RewriteRule .* app.php [QSA,L,E=_ROUTING__route:hello,E=_ROUTING_name:%1,E=_ROUTING__controller:AcmeDemoBundle\:Demo\:hello]
6161
62-
You can now rewrite `web/.htaccess` to use the new rules, so with our example
62+
You can now rewrite `web/.htaccess` to use the new rules, so with this example
6363
it should look like this:
6464

6565
.. code-block:: apache
@@ -82,15 +82,15 @@ it should look like this:
8282

8383
That's it!
8484
You're now all set to use Apache Route rules.
85-
85+
8686
Additional tweaks
8787
-----------------
8888

8989
To save a little bit of processing time, change occurrences of ``Request``
9090
to ``ApacheRequest`` in ``web/app.php``::
9191

9292
// web/app.php
93-
93+
9494
require_once __DIR__.'/../app/bootstrap.php.cache';
9595
require_once __DIR__.'/../app/AppKernel.php';
9696
//require_once __DIR__.'/../app/AppCache.php';

Diff for: cookbook/configuration/override_dir_structure.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
How to override Symfony's Default Directory Structure
55
=====================================================
66

7-
Symfony automatically ships with a default directory structure. You can
8-
easily override this directory structure to create your own. The default
7+
Symfony automatically ships with a default directory structure. You can
8+
easily override this directory structure to create your own. The default
99
directory structure is:
1010

1111
.. code-block:: text
@@ -26,7 +26,7 @@ directory structure is:
2626
Override the ``cache`` directory
2727
--------------------------------
2828

29-
You can override the cache directory by overriding the ``getCacheDir`` method
29+
You can override the cache directory by overriding the ``getCacheDir`` method
3030
in the ``AppKernel`` class of you application::
3131

3232
// app/AppKernel.php
@@ -43,7 +43,7 @@ in the ``AppKernel`` class of you application::
4343
}
4444

4545
``$this->rootDir`` is the absolute path to the ``app`` directory and ``$this->environment``
46-
is the current environment (i.e. ``dev``). In this case we have changed
46+
is the current environment (i.e. ``dev``). In this case you have changed
4747
the location of the cache directory to ``app/{environment}/cache``.
4848

4949
.. caution::
@@ -56,8 +56,8 @@ the location of the cache directory to ``app/{environment}/cache``.
5656
Override the ``logs`` directory
5757
-------------------------------
5858

59-
Overriding the ``logs`` directory is the same as overriding the ``cache``
60-
directory, the only difference is that you need to override the ``getLogDir``
59+
Overriding the ``logs`` directory is the same as overriding the ``cache``
60+
directory, the only difference is that you need to override the ``getLogDir``
6161
method::
6262

6363
// app/AppKernel.php
@@ -73,7 +73,7 @@ method::
7373
}
7474
}
7575

76-
Here we have changed the location of the directory to ``app/{environment}/logs``.
76+
Here you have changed the location of the directory to ``app/{environment}/logs``.
7777

7878
Override the ``web`` directory
7979
------------------------------
@@ -98,7 +98,7 @@ may need to modify the paths inside these files::
9898

9999
.. note::
100100

101-
If you use the AsseticBundle you need to configure this, so it can use
101+
If you use the AsseticBundle you need to configure this, so it can use
102102
the correct ``web`` directory:
103103

104104
.. code-block:: yaml
@@ -110,7 +110,7 @@ may need to modify the paths inside these files::
110110
# ...
111111
read_from: "%kernel.root_dir%/../../public_html"
112112
113-
Now you just need to dump the assets again and your application should
113+
Now you just need to dump the assets again and your application should
114114
work:
115115

116116
.. code-block:: bash

Diff for: cookbook/controller/error_pages.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ control you need:
2828
information, see :ref:`kernel-kernel.exception`.
2929

3030
All of the error templates live inside ``TwigBundle``. To override the
31-
templates, we simply rely on the standard method for overriding templates that
31+
templates, simply rely on the standard method for overriding templates that
3232
live inside a bundle. For more information, see
3333
:ref:`overriding-bundle-templates`.
3434

Diff for: cookbook/controller/service.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ extends the base
1010
this works fine, controllers can also be specified as services.
1111

1212
To refer to a controller that's defined as a service, use the single colon (:)
13-
notation. For example, suppose we've defined a service called
14-
``my_controller`` and we want to forward to a method called ``indexAction()``
13+
notation. For example, suppose you've defined a service called
14+
``my_controller`` and you want to forward to a method called ``indexAction()``
1515
inside the service::
1616

1717
$this->forward('my_controller:indexAction', array('foo' => $bar));
@@ -62,4 +62,4 @@ service, you need to specify your service as follows::
6262
In this example, ``my_bundle.annot_controller`` should be the id of the
6363
``AnnotController`` instance defined in the service container. This is
6464
documented in the :doc:`/bundles/SensioFrameworkExtraBundle/annotations/routing`
65-
chapter.
65+
chapter.

Diff for: cookbook/doctrine/file_uploads.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ object, which is what's returned after a ``file`` field is submitted::
210210
return;
211211
}
212212

213-
// we use the original file name here but you should
213+
// use the original file name here but you should
214214
// sanitize it at least to avoid any security issues
215-
215+
216216
// move takes the target directory and then the target filename to move to
217217
$this->file->move($this->getUploadRootDir(), $this->file->getClientOriginalName());
218218

Diff for: cookbook/doctrine/reverse_engineering.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ to a post record thanks to a foreign key constraint.
4949
Before diving into the recipe, be sure your database connection parameters are
5050
correctly setup in the ``app/config/parameters.ini`` file (or wherever your
5151
database configuration is kept) and that you have initialized a bundle that
52-
will host your future entity class. In this tutorial, we will assume that
52+
will host your future entity class. In this tutorial it's assumed that
5353
an ``AcmeBlogBundle`` exists and is located under the ``src/Acme/BlogBundle``
5454
folder.
5555

Diff for: cookbook/event_dispatcher/before_after_filters.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,6 @@ event:
275275
That's it! The ``TokenListener`` is now notified before every controller is
276276
executed (``onKernelController``) and after every controller returns a response
277277
(``onKernelResponse``). By making specific controllers implement the ``TokenAuthenticatedController``
278-
interface, our listener knows which controllers it should take action on.
278+
interface, your listener knows which controllers it should take action on.
279279
And by storing a value in the request's "attributes" bag, the ``onKernelResponse``
280280
method knows to add the extra header. Have fun!

Diff for: cookbook/event_dispatcher/class_extension.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ and *add* the method ``bar()``:
9797
{
9898
public function onFooMethodIsNotFound(HandleUndefinedMethodEvent $event)
9999
{
100-
// we only want to respond to the calls to the 'bar' method
100+
// only respond to the calls to the 'bar' method
101101
if ('bar' != $event->getMethod()) {
102102
// allow another listener to take care of this unknown method
103103
return;

Diff for: cookbook/logging/monolog.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ To log a message simply get the logger service from the container in
3333
your controller::
3434

3535
$logger = $this->get('logger');
36-
$logger->info('We just got the logger');
36+
$logger->info('I just got the logger');
3737
$logger->err('An error occurred');
3838

3939
.. tip::

Diff for: cookbook/routing/redirect_in_config.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Your configuration will look like this:
2828
2929
Your ``AppBundle`` is registered to handle all requests under ``/app``.
3030

31-
We configure a route for the ``/`` path and let :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController`
31+
You configure a route for the ``/`` path and let :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController`
3232
handle it. This controller is built-in and offers two methods for redirecting request:
3333

3434
* ``redirect`` redirects to another *route*. You must provide the ``route``

Diff for: cookbook/service_container/event_listener.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ component and can be viewed in the :class:`Symfony\\Component\\HttpKernel\\Kerne
1010

1111
To hook into an event and add your own custom logic, you have to create
1212
a service that will act as an event listener on that event. In this entry,
13-
we will create a service that will act as an Exception Listener, allowing
13+
you will create a service that will act as an Exception Listener, allowing
1414
us to modify how exceptions are shown by our application. The ``KernelEvents::EXCEPTION``
1515
event is just one of the core kernel events::
1616

@@ -25,11 +25,11 @@ event is just one of the core kernel events::
2525
{
2626
public function onKernelException(GetResponseForExceptionEvent $event)
2727
{
28-
// We get the exception object from the received event
28+
// You get the exception object from the received event
2929
$exception = $event->getException();
3030
$message = 'My Error says: ' . $exception->getMessage() . ' with code: ' . $exception->getCode();
3131

32-
// Customize our response object to display our exception details
32+
// Customize your response object to display the exception details
3333
$response = new Response();
3434
$response->setContent($message);
3535

@@ -42,7 +42,7 @@ event is just one of the core kernel events::
4242
$response->setStatusCode(500);
4343
}
4444

45-
// Send our modified response object to the event
45+
// Send the modified response object to the event
4646
$event->setResponse($response);
4747
}
4848
}
@@ -53,7 +53,7 @@ event is just one of the core kernel events::
5353
the ``kernel.exception`` event, it is :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent`.
5454
To see what type of object each event listener receives, see :class:`Symfony\\Component\\HttpKernel\\KernelEvents`.
5555

56-
Now that the class is created, we just need to register it as a service and
56+
Now that the class is created, you just need to register it as a service and
5757
notify Symfony that it is a "listener" on the ``kernel.exception`` event by
5858
using a special "tag":
5959

Diff for: cookbook/service_container/scopes.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ when compiling the container. Read the sidebar below for more details.
3737
the scope of the service, so it defaults to `container`. In other words,
3838
everytime you ask the container for the `my_mailer` service, you get
3939
the same object back. This is usually how you want your services to work.
40-
40+
4141
Imagine, however, that you need the `request` service in your `my_mailer`
4242
service, maybe because you're reading the URL of the current request.
4343
So, you add it as a constructor argument. Let's look at why this presents
@@ -67,7 +67,7 @@ when compiling the container. Read the sidebar below for more details.
6767
.. note::
6868

6969
A service can of course depend on a service from a wider scope without
70-
any issue.
70+
any issue.
7171

7272
Setting the Scope in the Definition
7373
-----------------------------------
@@ -116,7 +116,7 @@ new service in the `request` scope.
116116
But this is not always possible (for instance, a twig extension must be in
117117
the `container` scope as the Twig environment needs it as a dependency).
118118
In these cases, you should pass the entire container into your service and
119-
retrieve your dependency from the container each time we need it to be sure
119+
retrieve your dependency from the container each time you need it to be sure
120120
you have the right instance::
121121

122122
// src/Acme/HelloBundle/Mail/Mailer.php

Diff for: cookbook/symfony1.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ at its core, the skills used to master a symfony1 project continue to be
1010
very relevant when developing in Symfony2. Sure, ``app.yml`` is gone, but
1111
routing, controllers and templates all remain.
1212

13-
In this chapter, we'll walk through the differences between symfony1 and Symfony2.
13+
This chapter walks through the differences between symfony1 and Symfony2.
1414
As you'll see, many tasks are tackled in a slightly different way. You'll
1515
come to appreciate these minor differences as they promote stable, predictable,
1616
testable and decoupled code in your Symfony2 applications.
1717

18-
So, sit back and relax as we take you from "then" to "now".
18+
So, sit back and relax as your taken from "then" to "now".
1919

2020
Directory Structure
2121
-------------------
@@ -61,7 +61,7 @@ In other words, the code that drives your application lives in many different
6161
places.
6262

6363
In Symfony2, life is much simpler because *all* Symfony2 code must live in
64-
a bundle. In our pretend symfony1 project, all the code *could* be moved
64+
a bundle. In the pretend symfony1 project, all the code *could* be moved
6565
into one or more plugins (which is a very good practice, in fact). Assuming
6666
that all modules, PHP classes, schema, routing configuration, etc were moved
6767
into a plugin, the symfony1 ``plugins/`` directory would be very similar
@@ -134,7 +134,7 @@ The file itself lives at
134134
``vendor/bundle/Sensio/Bundle/FrameworkExtraBundle/SensioFrameworkExtraBundle.php``.
135135
As you can see, the location of the file follows the namespace of the class.
136136
Specifically, the namespace, ``Sensio\Bundle\FrameworkExtraBundle``, spells out
137-
the directory that the file should live in
137+
the directory that the file should live in
138138
(``vendor/bundle/Sensio/Bundle/FrameworkExtraBundle``). This is because, in the
139139
``app/autoload.php`` file, you'll configure Symfony to look for the ``Sensio``
140140
namespace in the ``vendor/bundle`` directory:
@@ -251,7 +251,7 @@ In Symfony2, the bundles are activated inside the application kernel::
251251
...,
252252
new Acme\DemoBundle\AcmeDemoBundle(),
253253
);
254-
254+
255255
return $bundles;
256256
}
257257

Diff for: cookbook/templating/PHP.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ your application configuration file:
1818
.. configuration-block::
1919

2020
.. code-block:: yaml
21-
21+
2222
# app/config/config.yml
2323
framework:
2424
# ...
@@ -42,7 +42,7 @@ your application configuration file:
4242
'templating' => array(
4343
'engines' => array('twig', 'php'),
4444
),
45-
));
45+
));
4646
4747
You can now render a PHP template instead of a Twig one simply by using the
4848
``.php`` extension in the template name instead of ``.twig``. The controller
@@ -82,7 +82,7 @@ Decorating Templates
8282
--------------------
8383

8484
More often than not, templates in a project share common elements, like the
85-
well-known header and footer. In Symfony2, we like to think about this problem
85+
well-known header and footer. In Symfony2, this problem is thought about
8686
differently: a template can be decorated by another one.
8787

8888
The ``index.html.php`` template is decorated by ``layout.html.php``, thanks to

Diff for: cookbook/templating/global_variables.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Now, the variable ``ga_tracking`` is available in all Twig templates:
1919

2020
.. code-block:: html+jinja
2121

22-
<p>Our google tracking code is: {{ ga_tracking }} </p>
22+
<p>The google tracking code is: {{ ga_tracking }} </p>
2323

2424
It's that easy! You can also take advantage of the built-in :ref:`book-service-container-parameters`
2525
system, which lets you isolate or reuse the value:

0 commit comments

Comments
 (0)