Skip to content

Commit d95e51c

Browse files
Removing uses of we from several book pages
1 parent 18687b9 commit d95e51c

File tree

7 files changed

+57
-57
lines changed

7 files changed

+57
-57
lines changed

book/controller.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ maps a URL to that controller (#2).
7373
.. note::
7474

7575
Though similarly named, a "front controller" is different from the
76-
"controllers" we'll talk about in this chapter. A front controller
76+
"controllers" talked about in this chapter. A front controller
7777
is a short PHP file that lives in your web directory and through which
7878
all requests are directed. A typical application will have a production
7979
front controller (e.g. ``app.php``) and a development front controller
@@ -324,7 +324,7 @@ working with forms, for example::
324324
public function updateAction(Request $request)
325325
{
326326
$form = $this->createForm(...);
327-
327+
328328
$form->bindRequest($request);
329329
// ...
330330
}
@@ -441,7 +441,7 @@ object that's returned from that controller::
441441
));
442442

443443
// ... further modify the response or return it directly
444-
444+
445445
return $response;
446446
}
447447

@@ -470,7 +470,7 @@ value to each variable.
470470
a shortcut for core Symfony2 functionality. A forward can be accomplished
471471
directly via the ``http_kernel`` service. A forward returns a ``Response``
472472
object::
473-
473+
474474
$httpKernel = $this->container->get('http_kernel');
475475
$response = $httpKernel->forward('AcmeHelloBundle:Hello:fancy', array(
476476
'name' => $name,
@@ -509,7 +509,7 @@ The Symfony templating engine is explained in great detail in the
509509

510510
The ``renderView`` method is a shortcut to direct use of the ``templating``
511511
service. The ``templating`` service can also be used directly::
512-
512+
513513
$templating = $this->get('templating');
514514
$content = $templating->render('AcmeHelloBundle:Hello:index.html.twig', array('name' => $name));
515515

@@ -662,7 +662,7 @@ the ``notice`` message:
662662
{% endif %}
663663

664664
.. code-block:: php
665-
665+
666666
<?php if ($view['session']->hasFlash('notice')): ?>
667667
<div class="flash-notice">
668668
<?php echo $view['session']->getFlash('notice') ?>
@@ -686,7 +686,7 @@ headers and content that's sent back to the client::
686686

687687
// create a simple Response with a 200 status code (the default)
688688
$response = new Response('Hello '.$name, 200);
689-
689+
690690
// create a JSON-response with a 200 status code
691691
$response = new Response(json_encode(array('name' => $name)));
692692
$response->headers->set('Content-Type', 'application/json');

book/from_flat_php_to_symfony2.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ better software than with flat PHP, you'll see for yourself.
1111
In this chapter, you'll write a simple application in flat PHP, and then
1212
refactor it to be more organized. You'll travel through time, seeing the
1313
decisions behind why web development has evolved over the past several years
14-
to where it is now.
14+
to where it is now.
1515

1616
By the end, you'll see how Symfony2 can rescue you from mundane tasks and
1717
let you take back control of your code.
@@ -134,7 +134,7 @@ to the area of *your* code that processes user input and prepares the response.
134134
In this case, our controller prepares data from the database and then includes
135135
a template to present that data. With the controller isolated, you could
136136
easily change *just* the template file if you needed to render the blog
137-
entries in some other format (e.g. ``list.json.php`` for JSON format).
137+
entries in some other format (e.g. ``list.json.php`` for JSON format).
138138

139139
Isolating the Application (Domain) Logic
140140
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -532,7 +532,7 @@ The Sample Application in Symfony2
532532
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
533533

534534
The blog has come a *long* way, but it still contains a lot of code for such
535-
a simple application. Along the way, we've also invented a simple routing
535+
a simple application. Along the way, you've made a simple routing
536536
system and a method using ``ob_start()`` and ``ob_get_clean()`` to render
537537
templates. If, for some reason, you needed to continue building this "framework"
538538
from scratch, you could at least use Symfony's standalone `Routing`_ and
@@ -564,7 +564,7 @@ them for you. Here's the same sample application, now built in Symfony2::
564564
->getRepository('AcmeBlogBundle:Post')
565565
->find($id)
566566
;
567-
567+
568568
if (!$post) {
569569
// cause the 404 page not found to be displayed
570570
throw $this->createNotFoundException();
@@ -581,7 +581,7 @@ now quite a bit simpler:
581581

582582
.. code-block:: html+php
583583

584-
<!-- src/Acme/BlogBundle/Resources/views/Blog/list.html.php -->
584+
<!-- src/Acme/BlogBundle/Resources/views/Blog/list.html.php -->
585585
<?php $view->extend('::layout.html.php') ?>
586586

587587
<?php $view['slots']->set('title', 'List of Posts') ?>
@@ -614,7 +614,7 @@ The layout is nearly identical:
614614

615615
.. note::
616616

617-
We'll leave the show template as an exercise, as it should be trivial to
617+
The show template is left as an exercise, as it should be trivial to
618618
create based on the list template.
619619

620620
When Symfony2's engine (called the ``Kernel``) boots up, it needs a map so
@@ -730,8 +730,8 @@ The corresponding ``layout.html.twig`` template is also easier to write:
730730
</html>
731731

732732
Twig is well-supported in Symfony2. And while PHP templates will always
733-
be supported in Symfony2, we'll continue to discuss the many advantages of
734-
Twig. For more information, see the :doc:`templating chapter</book/templating>`.
733+
be supported in Symfony2, the many advantages of Twig will continue to
734+
be discussed. For more information, see the :doc:`templating chapter</book/templating>`.
735735

736736
Learn more from the Cookbook
737737
----------------------------

book/page_creation.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,10 @@ application should greet you:
255255
.. code-block:: text
256256
257257
http://localhost/app.php/hello/Ryan
258-
258+
259259
If you get an error, it's likely because you need to clear your cache
260260
by running:
261-
261+
262262
.. code-block:: bash
263263
264264
$ php app/console cache:clear --env=prod --no-debug
@@ -299,8 +299,8 @@ of writing the HTML inside the controller, render a template instead:
299299
300300
.. note::
301301

302-
In order to use the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::render`
303-
method, your controller must extend the
302+
In order to use the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::render`
303+
method, your controller must extend the
304304
:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller` class,
305305
which adds shortcuts for tasks that are common inside controllers. This
306306
is done in the above example by adding the ``use`` statement on line 4
@@ -476,7 +476,7 @@ use a Kernel class, ``AppKernel``, to bootstrap the application.
476476
http://localhost/hello/Ryan
477477
478478
Though front controllers are essential in handling every request, you'll
479-
rarely need to modify or even think about them. We'll mention them again
479+
rarely need to modify or even think about them. They'll be mentioned again
480480
briefly in the `Environments`_ section.
481481

482482
The Application (``app``) Directory
@@ -731,7 +731,7 @@ format you prefer:
731731
imports:
732732
- { resource: parameters.ini }
733733
- { resource: security.yml }
734-
734+
735735
framework:
736736
secret: "%secret%"
737737
charset: UTF-8
@@ -758,7 +758,7 @@ format you prefer:
758758
<import resource="parameters.ini" />
759759
<import resource="security.yml" />
760760
</imports>
761-
761+
762762
<framework:config charset="UTF-8" secret="%secret%">
763763
<framework:router resource="%kernel.root_dir%/config/routing.xml" />
764764
<framework:form />

book/security.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ Users
874874
-----
875875

876876
In the previous sections, you learned how you can protect different resources
877-
by requiring a set of *roles* for a resource. In this section we'll explore
877+
by requiring a set of *roles* for a resource. This section explores
878878
the other side of authorization: users.
879879

880880
Where do Users come from? (*User Providers*)
@@ -1199,7 +1199,7 @@ look like::
11991199
method of an anonymous user object will return true. To check if your
12001200
user is actually authenticated, check for the ``IS_AUTHENTICATED_FULLY``
12011201
role.
1202-
1202+
12031203
In a Twig Template this object can be accessed via the ``app.user`` key,
12041204
which calls the :method:`GlobalVariables::getUser()<Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables::getUser>`
12051205
method:
@@ -1570,7 +1570,7 @@ Access Control in Controllers
15701570
-----------------------------
15711571

15721572
If you want to check if the current user has a role in your controller, use
1573-
the :method:`Symfony\\Component\\Security\\Core\\SecurityContext::isGranted`
1573+
the :method:`Symfony\\Component\\Security\\Core\\SecurityContext::isGranted`
15741574
method of the security context::
15751575

15761576
public function indexAction()

book/templating.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ Template Inheritance and Layouts
175175
--------------------------------
176176

177177
More often than not, templates in a project share common elements, like the
178-
header, footer, sidebar or more. In Symfony2, we like to think about this
179-
problem differently: a template can be decorated by another one. This works
178+
header, footer, sidebar or more. In Symfony2, this problem is thought about
179+
differently: a template can be decorated by another one. This works
180180
exactly the same as PHP classes: template inheritance allows you to build
181181
a base "layout" template that contains all the common elements of your site
182182
defined as **blocks** (think "PHP class with base methods"). A child template
@@ -468,8 +468,8 @@ ease the work of the template designer. In PHP, the templating system provides
468468
an extensible *helper* system that provides useful features in a template
469469
context.
470470

471-
We've already seen a few built-in Twig tags (``{% block %}`` & ``{% extends %}``)
472-
as well as an example of a PHP helper (``$view['slots']``). Let's learn a
471+
You've already seen a few built-in Twig tags (``{% block %}`` & ``{% extends %}``)
472+
as well as an example of a PHP helper (``$view['slots']``). Here you will learn a
473473
few more.
474474

475475
.. index::
@@ -551,7 +551,7 @@ template using the ``with`` command.
551551
.. tip::
552552

553553
The ``{'article': article}`` syntax is the standard Twig syntax for hash
554-
maps (i.e. an array with named keys). If we needed to pass in multiple
554+
maps (i.e. an array with named keys). If you needed to pass in multiple
555555
elements, it would look like this: ``{'foo': foo, 'bar': bar}``.
556556

557557
.. index::
@@ -607,7 +607,7 @@ The ``recentList`` template is perfectly straightforward:
607607

608608
.. note::
609609

610-
Notice that we've cheated and hardcoded the article URL in this example
610+
Notice that the article URL is hardcoded in this example
611611
(e.g. ``/article/*slug*``). This is a bad practice. In the next section,
612612
you'll learn how to do this correctly.
613613

@@ -810,7 +810,7 @@ advantage of Symfony's template inheritance.
810810
This section will teach you the philosophy behind including stylesheet
811811
and Javascript assets in Symfony. Symfony also packages another library,
812812
called Assetic, which follows this philosophy but allows you to do much
813-
more interesting things with those assets. For more information on
813+
more interesting things with those assets. For more information on
814814
using Assetic see :doc:`/cookbook/assetic/asset_management`.
815815

816816

@@ -851,13 +851,13 @@ page. From inside that contact page's template, do the following:
851851

852852
{% block stylesheets %}
853853
{{ parent() }}
854-
854+
855855
<link href="{{ asset('/css/contact.css') }}" type="text/css" rel="stylesheet" />
856856
{% endblock %}
857-
857+
858858
{# ... #}
859859

860-
In the child template, you simply override the ``stylesheets`` block and
860+
In the child template, you simply override the ``stylesheets`` block and
861861
put your new stylesheet tag inside of that block. Of course, since you want
862862
to add to the parent block's content (and not actually *replace* it), you
863863
should use the ``parent()`` Twig function to include everything from the ``stylesheets``
@@ -1063,7 +1063,7 @@ Three-level Inheritance
10631063
-----------------------
10641064

10651065
One common way to use inheritance is to use a three-level approach. This
1066-
method works perfectly with the three different types of templates we've just
1066+
method works perfectly with the three different types of templates that were just
10671067
covered:
10681068

10691069
* Create a ``app/Resources/views/base.html.twig`` file that contains the main
@@ -1282,7 +1282,7 @@ pattern is to do the following::
12821282
public function indexAction()
12831283
{
12841284
$format = $this->getRequest()->getRequestFormat();
1285-
1285+
12861286
return $this->render('AcmeBlogBundle:Blog:index.'.$format.'.twig');
12871287
}
12881288

book/testing.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ document::
226226

227227
request(
228228
$method,
229-
$uri,
230-
array $parameters = array(),
231-
array $files = array(),
232-
array $server = array(),
233-
$content = null,
229+
$uri,
230+
array $parameters = array(),
231+
array $files = array(),
232+
array $server = array(),
233+
$content = null,
234234
$changeHistory = true
235235
)
236236

@@ -434,8 +434,8 @@ it automatically. You can examine the response and force a redirection
434434
afterwards with the ``followRedirect()`` method::
435435

436436
$crawler = $client->followRedirect();
437-
438-
If you want the client to automatically follow all redirects, you can
437+
438+
If you want the client to automatically follow all redirects, you can
439439
force him with the ``followRedirects()`` method::
440440

441441
$client->followRedirects();
@@ -561,7 +561,7 @@ Just like links, you select forms with the ``selectButton()`` method::
561561

562562
.. note::
563563

564-
Notice that we select form buttons and not forms as a form can have several
564+
Notice that you select form buttons and not forms as a form can have several
565565
buttons; if you use the traversing API, keep in mind that you must look for a
566566
button.
567567

0 commit comments

Comments
 (0)