Skip to content

Commit 5b3eb69

Browse files
committed
Merge pull request #2332 from WouterJ/doc_override_dir_21
[#1519] Added charset configuration and composer to "override dir structure"
2 parents a2f362d + 2639ae0 commit 5b3eb69

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

cookbook/configuration/override_dir_structure.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,19 @@ may need to modify the paths inside these files::
9191
require_once __DIR__.'/../Symfony/app/bootstrap.php.cache';
9292
require_once __DIR__.'/../Symfony/app/AppKernel.php';
9393

94+
Since Symfony 2.1 (in which Composer is introduced), you also need to change
95+
the ``extra.symfony-web-dir`` option in the ``composer.json`` file:
96+
97+
.. code-block:: json
98+
99+
{
100+
...
101+
"extra": {
102+
...
103+
"symfony-web-dir": "my_new_web_dir"
104+
}
105+
}
106+
94107
.. tip::
95108

96109
Some shared hosts have a ``public_html`` web directory root. Renaming

reference/configuration/kernel.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,36 @@ the parent :class:`Symfony\\Component\\HttpKernel\\Kernel` class.
1111
Configuration
1212
-------------
1313

14+
* `Charset`_
1415
* `Kernel Name`_
1516
* `Root Directory`_
1617
* `Cache Directory`_
1718
* `Log Directory`_
1819

20+
.. versionadded:: 2.1
21+
The :method:`Symfony\\Component\\HttpKernel\\Kernel::getCharset` method is new
22+
in Symfony 2.1
23+
24+
Charset
25+
~~~~~~~
26+
27+
**type**: ``string`` **default**: ``UTF-8``
28+
29+
This returns the charset that is used in the application. To change it, override the
30+
:method:`Symfony\\Component\\HttpKernel\\Kernel::getCharset` method and return another
31+
charset, for instance::
32+
33+
// app/AppKernel.php
34+
35+
// ...
36+
class AppKernel extends Kernel
37+
{
38+
public function getCharset()
39+
{
40+
return 'ISO-8859-1';
41+
}
42+
}
43+
1944
Kernel Name
2045
~~~~~~~~~~~
2146

0 commit comments

Comments
 (0)