Skip to content

Commit d82f05c

Browse files
talitakzweaverryan
authored andcommitted
changes according to comments after PR + some other typos
1 parent a9cdc3c commit d82f05c

File tree

4 files changed

+35
-34
lines changed

4 files changed

+35
-34
lines changed

book/from_flat_php_to_symfony2.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ the code that prepares the HTML "presentation"::
102102
require 'templates/list.php';
103103

104104

105-
The HTML code is now stored in a separate file ``templates/list.php``, which
105+
The HTML code is now stored in a separate ``templates/list.php`` file, which
106106
is primarily an HTML file that uses a template-like PHP syntax:
107107

108108
.. code-block:: html+php
@@ -458,7 +458,7 @@ into a ``vendor/`` directory:
458458
459459
Beside downloading your dependencies, Composer generates a ``vendor/autoload.php`` file,
460460
which takes care of autoloading for all the files in the Symfony Framework as well as
461-
the files mentioned in the autoload section of your ``composer.json``.
461+
the files mentioned in the ``autoload`` section of your ``composer.json``.
462462

463463
Core to Symfony's philosophy is the idea that an application's main job is
464464
to interpret each request and return a response. To this end, Symfony provides
@@ -726,7 +726,7 @@ And rewriting ``layout.html.php`` template in Twig would look like this:
726726

727727
Twig is well-supported in Symfony. And while PHP templates will always
728728
be supported in Symfony, the many advantages of Twig will continue to
729-
be discussed. For more information, see the :doc:`templating chapter </book/templating>`.
729+
be discussed. For more information, see the :doc:`Templating chapter </book/templating>`.
730730

731731

732732
Where Symfony Delivers
@@ -776,7 +776,7 @@ Learn more from the Cookbook
776776
.. _`Composer`: https://getcomposer.org
777777
.. _`download Composer`: https://getcomposer.org/download/
778778
.. _`Symfony distribution`: https://github.com/symfony/symfony-standard
779+
.. _`Twig`: http://twig.sensiolabs.org
779780
.. _`Validator`: https://github.com/symfony/validator
780781
.. _`Varnish`: https://www.varnish-cache.org/
781-
.. _`KnpBundles.com`: http://knpbundles.com/
782-
.. _`Twig`: http://twig.sensiolabs.org
782+
.. _`KnpBundles.com`: http://knpbundles.com/

book/http_fundamentals.rst

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ Symfony is built from the ground up around that reality. Whether you realize
4141
it or not, HTTP is something you use every day. With Symfony, you'll learn
4242
how to master it.
4343

44+
.. index::
45+
single: HTTP; Request-response paradigm
46+
4447
Step1: The Client Sends a Request
4548
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4649

@@ -98,10 +101,10 @@ delete a specific blog entry, for example:
98101
but many of them are not widely used or supported. In reality, many
99102
modern browsers only support ``POST`` and ``GET`` in HTML forms. Various
100103
others are however supported in `XMLHttpRequest`_, as well as by Symfony's
101-
:doc:`router </components/routing/introduction>`.
104+
:doc:`Routing component </components/routing/introduction>`.
102105

103-
In addition to the first line, an HTTP request invariably contains other
104-
lines of information called request headers. The headers can supply a wide
106+
In addition to the first line, a HTTP request invariably contains other
107+
lines of information called request **headers**. The headers can supply a wide
105108
range of information such as the host of the resource being requested (``Host``),
106109
the response formats the client accepts (``Accept``) and the application the
107110
client is using to make the request (``User-Agent``). Many other headers exist
@@ -252,17 +255,18 @@ have all the request information at your fingertips::
252255
``Request`` class has several public properties via which we can access information
253256
about the client request. As seen above, the ``$_GET`` and ``$_POST`` PHP global
254257
variables are accessible via the public ``query`` and ``request`` properties
255-
respectively, ``$_COOKIE`` is accessible via ``cookies``, ``$_FILES`` via ``files``
256-
and ``$_SERVER`` via ``server``. ``headers`` property is mostly equivalent to
257-
a subset of ``$_SERVER`` (e.g. $request->headers->get('User-Agent')). Each property is a
258+
respectively, ``$_COOKIE`` is accessible via ``cookies`` property, ``$_FILES``
259+
via ``files`` property and ``$_SERVER`` via ``server`` property. ``headers``
260+
property is mostly equivalent to a subset of ``$_SERVER``
261+
(e.g. $request->headers->get('User-Agent')). Each property is a
258262
:class:`Symfony\\Component\\HttpFoundation\\ParameterBag` instance (or a sub-class
259263
of: :class:`Symfony\\Component\\HttpFoundation\\ServerBag`,
260264
:class:`Symfony\\Component\\HttpFoundation\\FileBag`,
261-
:class:`Symfony\\Component\\HttpFoundation\\HeaderBag`,
265+
:class:`Symfony\\Component\\HttpFoundation\\HeaderBag`
262266
), which is a data holder class. All ``ParameterBag`` instances have methods to
263267
retrieve and update their data like: ``get()`` to return a parameter by name,
264268
``has()`` to return true if the parameter is defined, ``all()`` to return all
265-
the parameters and many more...
269+
the parameters and many more.
266270

267271
.. _book-fundamentals-attributes:
268272

@@ -438,7 +442,7 @@ the same simple pattern for every request:
438442
:align: center
439443
:alt: Symfony request flow
440444

441-
Incoming requests are interpreted by the :doc:`router component </book/routing>` and
445+
Incoming requests are interpreted by the :doc:`Routing component </book/routing>` and
442446
passed to PHP functions that return ``Response`` objects.
443447

444448
Each "page" of your site is defined in a routing configuration file that
@@ -509,7 +513,7 @@ When someone visits the ``/contact`` page, this route is matched, and the
509513
specified controller is executed. As you'll learn in the
510514
:ref:`routing chapter <controller-string-syntax>`, the ``AppBundle:Main:contact``
511515
string is a short syntax named *logical controller name* that points to a specific
512-
controller ``contactAction()`` inside a controller class called ``MainController)+``.
516+
controller ``contactAction()`` inside a controller class called ``MainController``.
513517
In the routing chapter you will also learn about routing parameters like
514518
``_controller``, ``_route`` and the ``defaults`` array.
515519

@@ -529,13 +533,13 @@ object with the HTML ``<h1>Contact us!</h1>``::
529533
}
530534
}
531535

532-
In the :doc:`controller chapter </book/controller>`, you'll learn how a controller can
536+
In the :doc:`Controller chapter </book/controller>`, you'll learn how a controller can
533537
render templates, allowing your "presentation" code (i.e. anything that actually
534538
writes out HTML) to live in a separate template file. This frees up the controller
535539
to worry only about the hard stuff: interacting with the database, handling
536540
submitted data, or sending email messages.
537541

538-
-.. _symfony2-build-your-app-not-your-tools:
542+
.. _symfony2-build-your-app-not-your-tools:
539543

540544
Symfony: Build your App, not your Tools
541545
---------------------------------------

book/installation.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ version as the second argument of the ``create-project`` Composer command::
158158
doing anything. If that's your case, add the ``-vvv`` flag to the previous
159159
command to display a detailed output of everything that Composer is doing.
160160

161+
$ composer create-project -vvv symfony/framework-standard-edition my_project_name "2.3.*"
162+
161163
Running the Symfony Application
162164
-------------------------------
163165

@@ -445,10 +447,10 @@ a wide variety of articles about solving specific problems with Symfony.
445447
.. _`Apache`: http://httpd.apache.org/docs/current/mod/core.html#documentroot
446448
.. _`Nginx`: http://wiki.nginx.org/Symfony
447449
.. _`enable ACL support`: https://help.ubuntu.com/community/FilePermissionsACLs
450+
.. _`Git`: http://git-scm.com/
448451
.. _`Symfony Standard Edition`: https://github.com/symfony/symfony-standard
449452
.. _`Symfony CMF Standard Edition`: https://github.com/symfony-cmf/symfony-cmf-standard
450453
.. _`Symfony CMF`: http://cmf.symfony.com/
451454
.. _`CMS`: https://en.wikipedia.org/wiki/Content_management_system
452455
.. _`Symfony REST Edition`: https://github.com/gimler/symfony-rest-edition
453456
.. _`FOSRestBundle`: https://github.com/FriendsOfSymfony/FOSRestBundle
454-
.. _`Git`: http://git-scm.com/

book/page_creation.rst

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Creating a Page: Route and Controller
3333
:doc:`Installation </book/installation>` chapter, installed
3434
`Symfony Standard Edition`_ and can access your new Symfony app in the
3535
browser either using PHP's internal web server or by setting proper
36-
virtual host in Apache or Nginx replace.
36+
virtual host in Apache or Nginx.
3737

3838
Using PHP's internal web server is only suitable while developing the
3939
application. In order to run Symfony applications on production servers,
@@ -121,7 +121,7 @@ If you see a lucky number being printed back to you, congratulations! But before
121121
you run off to play the lottery, check out how this works.
122122

123123
The ``@Route`` above ``numberAction()`` method is called an :term:`annotation`
124-
and defines the route so that :doc:`router </book/routing>` can match the incoming URL
124+
and defines the route so that :doc:`Router </book/routing>` can match the incoming URL
125125
(``http://localhost:8000/lucky/number``) to a specific route (``/lucky/number``)
126126
and therefore returns information about the route, including the controller method
127127
that should be executed. The correct controller from the matched route is executed
@@ -131,7 +131,7 @@ object.
131131
.. note::
132132

133133
You can also write routes in YAML, XML or PHP: you will learn about
134-
this in the :doc:`routing </book/routing>` chapter. If you look closer
134+
this in the :doc:`Routing </book/routing>` chapter. If you look closer
135135
the above example has tabs that show you how each format looks - all three additional
136136
formats use routing configuration file to define routes. Actually, most
137137
routing examples in the docs have tabs that show you how each format looks.
@@ -485,20 +485,14 @@ which you'll use to enable new bundles (and one of a *very* short list of
485485
PHP files in ``app/``).
486486

487487
The ``src/`` directory has just one directory ``src/AppBundle`` and everything
488-
lives inside of it. Is where your code lives.
489-
Symfony Standard Edition comes with ``AppBundle`` but there is nothing special about
490-
``AppBundle``. Your project can have as many bundles as you want, you can even use
491-
bundles written bay other
492-
493-
The ``src/`` directory has just one directory ``src/AppBundle`` and everything
494-
lives inside of it. Is where your code lives. It's a set of files within a
488+
lives inside of it. Is where your code lives. It's a set of files within a
495489
directory that implement a single feature. Symfony Standard Edition comes with
496490
``AppBundle`` but there is nothing special about ``AppBundle``. Your project can
497-
have as many bundles as you want, you can even use third-party bundles that you can
498-
find at `KnpBundles.com`_. So, a :term:`bundle` is like a "plugin" in other software,
499-
but even better. To find out more about bundles and why you might create multiple
500-
bundles (hint: sharing code between projects), see the :doc:`Bundles </book/bundles>`
501-
chapter.
491+
have as many bundles as you want, you can even use third-party bundles written
492+
by other that you can find at `KnpBundles.com`_. So, a :term:`bundle` is like a
493+
"plugin" in other software, but even better. To find out more about bundles and
494+
why you might create multiple bundles (hint: sharing code between projects), see
495+
the :doc:`Bundles </book/bundles>` chapter.
502496

503497
So what about the other directories in the project?
504498

@@ -514,7 +508,8 @@ So what about the other directories in the project?
514508
.. seealso::
515509

516510
Symfony is flexible. If you need to, you can easily override the default
517-
directory structure. See :doc:`/cookbook/configuration/override_dir_structure`.
511+
directory structure. See cookbook article
512+
:doc:`/cookbook/configuration/override_dir_structure`.
518513

519514
Application Configuration
520515
-------------------------

0 commit comments

Comments
 (0)