Skip to content

Commit 93aae98

Browse files
committed
renamed hello/ directory to app/ as per the sandbox change
1 parent 897506d commit 93aae98

File tree

3 files changed

+31
-33
lines changed

3 files changed

+31
-33
lines changed

quick_tour/the_architecture.rst

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ The directory structure of a Symfony :term:`application` is rather flexible
1616
but the directory structure of a sandbox reflects the typical and recommended
1717
structure of a Symfony application:
1818

19-
* ``hello/``: This directory, named after your application, contains the
20-
configuration files;
19+
* ``app/``: This directory contains the application configuration;
2120

2221
* ``src/``: All the PHP code is stored under this directory;
2322

@@ -35,22 +34,22 @@ live:
3534
<!-- web/index.php -->
3635
<?php
3736

38-
require_once __DIR__.'/../hello/HelloKernel.php';
37+
require_once __DIR__.'/../app/AppKernel.php';
3938

40-
$kernel = new HelloKernel('prod', false);
39+
$kernel = new AppKernel('prod', false);
4140
$kernel->handle()->send();
4241

43-
Like any front controller, ``index.php`` uses a Kernel Class, ``HelloKernel``, to
44-
bootstrap the application.
42+
Like any front controller, ``index.php`` uses a Kernel Class, ``AppKernel``,
43+
to bootstrap the application.
4544

4645
.. index::
4746
single: Kernel
4847

4948
The Application Directory
5049
~~~~~~~~~~~~~~~~~~~~~~~~~
5150

52-
The ``HelloKernel`` class is the main entry point of the application
53-
configuration and as such, it is stored in the ``hello/`` directory.
51+
The ``AppKernel`` class is the main entry point of the application
52+
configuration and as such, it is stored in the ``app/`` directory.
5453

5554
This class must implement four methods:
5655

@@ -72,7 +71,7 @@ understand the flexibility of the framework.
7271
To make things work together, the kernel requires one file from the ``src/``
7372
directory::
7473

75-
// hello/HelloKernel.php
74+
// app/AppKernel.php
7675
require_once __DIR__.'/../src/autoload.php';
7776

7877
The Source Directory
@@ -128,14 +127,13 @@ own bundles. It makes it so easy to pick and choose which features to enable
128127
in your application and optimize them the way you want.
129128

130129
An application is made up of bundles as defined in the ``registerBundles()``
131-
method of the ``HelloKernel`` class::
130+
method of the ``AppKernel`` class::
132131

133-
// hello/HelloKernel.php
132+
// app/AppKernel.php
134133

135134
public function registerBundles()
136135
{
137136
$bundles = array(
138-
new Symfony\Framework\KernelBundle(),
139137
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
140138
new Symfony\Bundle\ZendBundle\ZendBundle(),
141139
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
@@ -165,7 +163,7 @@ PHP. Have a look at the default configuration:
165163

166164
.. code-block:: yaml
167165
168-
# hello/config/config.yml
166+
# app/config/config.yml
169167
kernel.config:
170168
charset: UTF-8
171169
error_handler: null
@@ -179,7 +177,7 @@ PHP. Have a look at the default configuration:
179177
180178
.. code-block:: xml
181179
182-
<!-- hello/config/config.xml -->
180+
<!-- app/config/config.xml -->
183181
<kernel:config
184182
charset="UTF-8"
185183
error_handler="null"
@@ -196,7 +194,7 @@ PHP. Have a look at the default configuration:
196194
197195
.. code-block:: php
198196
199-
// hello/config/config.php
197+
// app/config/config.php
200198
$container->loadFromExtension('kernel', 'config', array(
201199
'charset' => 'UTF-8',
202200
'error_handler' => null,
@@ -223,7 +221,7 @@ specific configuration file:
223221

224222
.. code-block:: yaml
225223
226-
# hello/config/config_dev.yml
224+
# app/config/config_dev.yml
227225
imports:
228226
- { resource: config.yml }
229227
@@ -236,7 +234,7 @@ specific configuration file:
236234
237235
.. code-block:: xml
238236
239-
<!-- hello/config/config_dev.xml -->
237+
<!-- app/config/config_dev.xml -->
240238
<imports>
241239
<import resource="config.xml" />
242240
</imports>
@@ -252,7 +250,7 @@ specific configuration file:
252250
253251
.. code-block:: php
254252
255-
// hello/config/config.php
253+
// app/config/config.php
256254
$loader->import('config.php');
257255
258256
$container->loadFromExtension('web', 'config', array(
@@ -331,13 +329,13 @@ Run it without any arguments to learn more about its capabilities:
331329

332330
.. code-block:: bash
333331
334-
$ php hello/console
332+
$ php app/console
335333
336334
The ``--help`` option helps you discover the usage of a command:
337335

338336
.. code-block:: bash
339337
340-
$ php hello/console router:debug --help
338+
$ php app/console router:debug --help
341339
342340
Final Thoughts
343341
--------------

quick_tour/the_big_picture.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ should now have a ``sandbox/`` directory::
3030

3131
www/ <- your web root directory
3232
sandbox/ <- the unpacked archive
33-
hello/
33+
app/
3434
cache/
3535
config/
3636
logs/
@@ -76,7 +76,7 @@ What's going on here? Let's dissect the URL:
7676
.. index:: Front Controller
7777

7878
* ``index_dev.php``: This is a "front controller". It is the unique entry
79-
point of the hello application and it responds to all user requests;
79+
point of the application and it responds to all user requests;
8080

8181
* ``/hello/Fabien``: This is the "virtual" path to the resource the user wants
8282
to access.
@@ -100,9 +100,9 @@ very easy).
100100

101101
.. tip::
102102
The sandbox defaults to YAML, but you can easily switch to XML or PHP by
103-
editing the ``config/HelloKernel.php`` file. You can switch now by looking
104-
at the bottom of ``config/HelloKernel.php`` for instructions (the tutorials
105-
show the configuration for all supported formats).
103+
editing the ``config/AppKernel.php`` file. You can switch now by looking at
104+
the bottom of ``config/AppKernel.php`` for instructions (the tutorials show
105+
the configuration for all supported formats).
106106

107107
.. index::
108108
single: Routing
@@ -117,7 +117,7 @@ So, Symfony routes the request by reading the routing configuration file:
117117

118118
.. code-block:: yaml
119119
120-
# hello/config/routing.yml
120+
# app/config/routing.yml
121121
homepage:
122122
pattern: /
123123
defaults: { _controller: FrameworkBundle:Default:index }
@@ -127,7 +127,7 @@ So, Symfony routes the request by reading the routing configuration file:
127127
128128
.. code-block:: xml
129129
130-
<!-- hello/config/routing.xml -->
130+
<!-- app/config/routing.xml -->
131131
<?xml version="1.0" encoding="UTF-8" ?>
132132
133133
<routes xmlns="http://www.symfony-project.org/schema/routing"
@@ -143,7 +143,7 @@ So, Symfony routes the request by reading the routing configuration file:
143143
144144
.. code-block:: php
145145
146-
// hello/config/routing.php
146+
// app/config/routing.php
147147
use Symfony\Component\Routing\RouteCollection;
148148
use Symfony\Component\Routing\Route;
149149
@@ -302,7 +302,7 @@ better looking URL:
302302
http://localhost/hello/Fabien
303303

304304
To make the production environment as fast as possible, Symfony maintains a
305-
cache under the ``hello/cache/`` directory. When you make changes, you need to
305+
cache under the ``app/cache/`` directory. When you make changes, you need to
306306
manually remove the cached files. That's why you should always use the
307307
development front controller (``index_dev.php``) when working on a project.
308308

quick_tour/the_view.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ Now, let's have a look at the ``layout.php`` file:
5151
The layout is itself decorated by another layout (``::layout``). Symfony
5252
supports multiple decoration levels: a layout can itself be decorated by
5353
another one. When the bundle part of the template name is empty, views are
54-
looked for in the ``hello/views/`` directory. This directory store global
55-
views for your entire project:
54+
looked for in the ``app/views/`` directory. This directory store global views
55+
for your entire project:
5656

5757
.. code-block:: html+php
5858

59-
<!-- hello/views/layout.php -->
59+
<!-- app/views/layout.php -->
6060
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6161
<html>
6262
<head>
@@ -100,7 +100,7 @@ The base layout already have the code to output the title in the header:
100100

101101
.. code-block:: html+php
102102

103-
<!-- hello/views/layout.php -->
103+
<!-- app/views/layout.php -->
104104
<head>
105105
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
106106
<title><?php $view['slots']->output('title', 'Hello Application') ?></title>

0 commit comments

Comments
 (0)