Skip to content

[#1519] Added charset configuration and composer to "override dir structure" #2332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 30, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions cookbook/configuration/override_dir_structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ may need to modify the paths inside these files::
require_once __DIR__.'/../Symfony/app/bootstrap.php.cache';
require_once __DIR__.'/../Symfony/app/AppKernel.php';

Since Symfony 2.1 (in which Composer is introduced), you also need to change
the ``extra.symfony-web-dir`` option in the ``composer.json`` file:

.. code-block:: json

{
...
"extra": {
...
"symfony-web-dir": "my_new_web_dir"
}
}

.. tip::

Some shared hosts have a ``public_html`` web directory root. Renaming
Expand Down
25 changes: 25 additions & 0 deletions reference/configuration/kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,36 @@ the parent :class:`Symfony\\Component\\HttpKernel\\Kernel` class.
Configuration
-------------

* `Charset`_
* `Kernel Name`_
* `Root Directory`_
* `Cache Directory`_
* `Log Directory`_

.. versionadded:: 2.1
The :method:`Symfony\\Component\\HttpKernel\\Kernel::getCharset` method is new
in Symfony 2.1

Charset
~~~~~~~

**type**: ``string`` **default**: ``UTF-8``

This returns the charset that is used in the application. To change it, override the
:method:`Symfony\\Component\\HttpKernel\\Kernel::getCharset` method and return another
charset, for instance::

// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
public function getCharset()
{
return 'ISO-8859-1';
}
}

Kernel Name
~~~~~~~~~~~

Expand Down