@@ -27,7 +27,7 @@ A Simple Blog in Flat PHP
27
27
28
28
In this chapter, you'll build the token blog application using only flat PHP.
29
29
To begin, create a single page that displays blog entries that have been
30
- persisted to the database. Writing in flat PHP is quick and dirty::
30
+ persisted to the database. Writing in flat PHP is quick and dirty:
31
31
32
32
.. code-block :: html+php
33
33
@@ -103,7 +103,7 @@ the code that prepares the HTML "presentation"::
103
103
104
104
105
105
The HTML code is now stored in a separate file ``templates/list.php ``, which
106
- is primarily an HTML file that uses a template-like PHP syntax::
106
+ is primarily an HTML file that uses a template-like PHP syntax:
107
107
108
108
.. code-block :: html+php
109
109
@@ -203,7 +203,7 @@ offering various advantages and the opportunity to reuse almost everything
203
203
on different pages.
204
204
205
205
The only part of the code that *can't * be reused is the page layout. Fix
206
- that by creating a new ``templates/layout.php `` file::
206
+ that by creating a new ``templates/layout.php `` file:
207
207
208
208
.. code-block :: html+php
209
209
@@ -219,7 +219,7 @@ that by creating a new ``templates/layout.php`` file::
219
219
</html>
220
220
221
221
The template ``templates/list.php `` can now be simplified to "extend"
222
- the ``templates/layout.php ``::
222
+ the ``templates/layout.php ``:
223
223
224
224
.. code-block :: html+php
225
225
@@ -286,7 +286,7 @@ page::
286
286
require 'templates/show.php';
287
287
288
288
Finally, create the new template file - ``templates/show.php `` - to render
289
- the individual blog post::
289
+ the individual blog post:
290
290
291
291
.. code-block :: html+php
292
292
@@ -436,7 +436,7 @@ autoloader is a tool that makes it possible to start using PHP classes
436
436
without explicitly including the file containing the class.
437
437
438
438
In your root directory, create a ``composer.json `` file with the following
439
- content::
439
+ content:
440
440
441
441
.. code-block :: json
442
442
@@ -591,7 +591,7 @@ also called *actions*. They hold code which creates and returns the appropriate
591
591
The two controllers are still lightweight. Each uses the
592
592
:doc: `Doctrine ORM library </book/doctrine >` to retrieve objects from the
593
593
database and the Templating component to render a template and return a
594
- ``Response `` object. The list ``list.php `` template is now quite a bit simpler::
594
+ ``Response `` object. The list ``list.php `` template is now quite a bit simpler:
595
595
596
596
.. code-block :: html+php
597
597
@@ -614,7 +614,7 @@ database and the Templating component to render a template and return a
614
614
<?php endforeach ?>
615
615
</ul>
616
616
617
- The layout ``layout.php `` is nearly identical::
617
+ The layout ``layout.php `` is nearly identical:
618
618
619
619
.. code-block :: html+php
620
620
@@ -640,7 +640,7 @@ The layout ``layout.php`` is nearly identical::
640
640
When Symfony's engine (called the :term: `Kernel `) boots up, it needs a map so
641
641
that it knows which controllers to execute based on the request information.
642
642
A routing configuration map ``app/config/routing.yml `` provides this information
643
- in a readable format::
643
+ in a readable format:
644
644
645
645
.. code-block :: yaml
646
646
@@ -687,7 +687,7 @@ If you choose to use it, Symfony comes standard with a templating engine
687
687
called `Twig `_ that makes templates faster to write and easier to read.
688
688
It means that the sample application could contain even less code! Take,
689
689
for example, rewriting ``list.html.php `` template in Twig would look like
690
- this::
690
+ this:
691
691
692
692
.. code-block :: html+twig
693
693
@@ -709,7 +709,7 @@ this::
709
709
</ul>
710
710
{% endblock %}
711
711
712
- And rewriting ``layout.html.php `` template in Twig would look like this::
712
+ And rewriting ``layout.html.php `` template in Twig would look like this:
713
713
714
714
.. code-block :: html+twig
715
715
0 commit comments