8000 Inline links to Symfony docs · symfony/symfony-docs@11cd563 · GitHub
[go: up one dir, main page]

Skip to content

Commit 11cd563

Browse files
committed
Inline links to Symfony docs
1 parent 4417191 commit 11cd563

8 files changed

+17
-18
lines changed

book/from_flat_php_to_symfony2.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ As it stands now, that code would need to be added to every controller file.
320320
If you forget to include something in one file, hopefully it doesn't relate
321321
to security...
322322

323+
.. _book-from_flat_php-front-controller:
324+
323325
A "Front Controller" to the Rescue
324326
----------------------------------
325327

create_framework/front-controller.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ routing all client requests to a single PHP script.
7171
.. tip::
7272

7373
Exposing a single PHP script to the end user is a design pattern called
74-
the "`front controller`_".
74+
the ":ref:`front controller <book-from_flat_php-front-controller>`".
7575

7676
Such a script might look like the following::
7777

@@ -235,5 +235,3 @@ variable.
235235

236236
If you decide to stop here, you can probably enhance your framework by
237237
extracting the URL map to a configuration file.
238-
239-
.. _`front controller`: http://symfony.com/doc/current/book/from_flat_php_to_symfony2.html#a-front-controller-to-the-rescue

create_framework/http-foundation.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ unit test for the above code::
7878
.. note::
7979

8080
If our application were just slightly bigger, we would have been able to
81-
find even more problems. If you are curious about them, read the `Symfony
82-
versus Flat PHP`_ chapter of the Symfony documentation.
81+
find even more problems. If you are curious about them, read the
82+
:doc:`/book/from_flat_php_to_symfony2` chapter of the book.
8383

8484
At this point, if you are not convinced that security and testing are indeed
8585
two very good reasons to stop writing code the old way and adopt a framework
@@ -289,7 +289,6 @@ applications using it (like `Symfony`_, `Drupal 8`_, `phpBB 4`_, `ezPublish
289289
5`_, `Laravel`_, `Silex`_, and `more`_).
290290

291291
.. _`Twig`: http://twig.sensiolabs.org/
292-
.. _`Symfony versus Flat PHP`: http://symfony.com/doc/current/book/from_flat_php_to_symfony2.html
293292
.. _`HTTP specification`: http://tools.ietf.org/wg/httpbis/
294293
.. _`audited`: http://symfony.com/blog/symfony2-security-audit
295294
.. _`Symfony`: http://symfony.com/

create_framework/http-kernel-controller-resolver.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ method is not defined, an argument has no matching attribute, ...).
142142
With the great flexibility of the default controller resolver, you might
143143
wonder why someone would want to create another one (why would there be an
144144
interface if not?). Two examples: in Symfony, ``getController()`` is
145-
enhanced to support `controllers as services`_; and in
145+
enhanced to support
146+
:doc:`controllers as services </cookbook/controller/service>`; and in
146147
`FrameworkExtraBundle`_, ``getArguments()`` is enhanced to support
147148
parameter converters, where request attributes are converted to objects
148149
automatically.

create_framework/http-kernel-httpkernel-class.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ And in your controller, return a ``StreamedResponse`` instance instead of a
122122

123123
.. tip::
124124

125-
Read the `Internals`_ chapter of the Symfony documentation to learn more
126-
about the events dispatched by HttpKernel and how they allow you to change
127-
the flow of a request.
125+
Read the :doc:`/reference/events` reference to learn more about the events
126+
dispatched by HttpKernel and how they allow you to change the flow of a
127+
request.
128128

129129
Now, let's create a listener, one that allows a controller to return a string
130130
instead of a full Response object::
@@ -200,5 +200,3 @@ worlds: a custom framework, tailored to your needs, but based on a rock-solid
200200
and well maintained low-level architecture that has been proven to work for
201201
many websites; a code that has been audited for security issues and that has
202202
proven to scale well.
203-
204-
.. _`Internals`: http://symfony.com/doc/current/book/internals.html#events

create_framework/http-kernel-httpkernelinterface.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Update your framework so that it implements this interface::
4040
}
4141

4242
Even if this change looks trivial, it brings us a lot! Let's talk about one of
43-
the most impressive one: transparent `HTTP caching`_ support.
43+
the most impressive one: transparent :doc:`HTTP caching </book/http_cache>` support.
4444

4545
The ``HttpCache`` class implements a fully-featured reverse proxy, written in
4646
PHP; it implements ``HttpKernelInterface`` and wraps another

create_framework/introduction.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,5 @@ In the next chapter, we are going to introduce the HttpFoundation Component
121121
and see what it brings us.
122122

123123
.. _`Symfony`: http://symfony.com/
124-
.. _`documentation`: http://symfony.com/doc
125124
.. _`Silex`: http://silex.sensiolabs.org/
126125
.. _`Composer`: http://packagist.org/about-composer

create_framework/routing.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ of default values for route attributes (``array('name' => 'World')``).
7878

7979
.. note::
8080

81-
Read the official `documentation`_ for the Routing component to learn more
82-
about its many features like URL generation, attribute requirements, HTTP
83-
method enforcements, loaders for YAML or XML files, dumpers to PHP or
84-
Apache rewrite rules for enhanced performance, and much more.
81+
Read the
82+
:doc:`Routing component documentation </component/routing/introduction>` to
83+
learn more about its many features like URL generation, attribute
84+
requirements, HTTP method enforcements, loaders for YAML or XML files,
85+
dumpers to PHP or Apache rewrite rules for enhanced performance, and much
86+
more.
8587

8688
Based on the information stored in the ``RouteCollection`` instance, a
8789
``UrlMatcher`` instance can match URL paths::

0 commit comments

Comments
 (0)
0