Commit 675a4c8e authored by Fabien Potencier's avatar Fabien Potencier

merged branch adrienbrault/doc-fixes (PR #357)

Commits
-------

54aa24f1 [Doc] Fix code-blocks, links, identation

Discussion
----------

[Doc] Fix missing code-block tag, links, identation

Hi,

I fixed some presentations problems, and added some links to the symfony api.

---------------------------------------------------------------------------

by adrienbrault at 2012-06-13T10:04:39Z

Updated my commit regarding your comments.

Still, the 2 php block here http://silex.sensiolabs.org/doc/cookbook/json_request_body.html are not formatted.

---------------------------------------------------------------------------

by adrienbrault at 2012-06-13T10:22:42Z

Nevermind about "json_request_body", i thought the website was up to date, sorry!
parents d1d45410 54aa24f1
...@@ -7,9 +7,13 @@ medium to large websites use a database to store sessions instead of files, ...@@ -7,9 +7,13 @@ medium to large websites use a database to store sessions instead of files,
because databases are easier to use and scale in a multi-webserver because databases are easier to use and scale in a multi-webserver
environment. environment.
Symfony2's ``NativeSessionStorage`` has multiple storage handlers and one of Symfony2's `NativeSessionStorage
them uses PDO to store sessions, ``PdoSessionHandler``. To use it, replace the <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.html>`_
``session.storage.handler`` service in your application like explained below. has multiple storage handlers and one of them uses PDO to store sessions,
`PdoSessionHandler
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.html>`_.
To use it, replace the ``session.storage.handler`` service in your application
like explained below.
Example Example
------- -------
......
...@@ -52,9 +52,9 @@ Registering ...@@ -52,9 +52,9 @@ Registering
.. code-block:: php .. code-block:: php
$app->register(new Silex\Provider\DoctrineServiceProvider(), array( $app->register(new Silex\Provider\DoctrineServiceProvider(), array(
'db.options' => array( 'db.options' => array(
'driver' => 'pdo_sqlite', 'driver' => 'pdo_sqlite',
'path' => __DIR__.'/app.db', 'path' => __DIR__.'/app.db',
), ),
)); ));
......
...@@ -59,7 +59,7 @@ Usage ...@@ -59,7 +59,7 @@ Usage
The MonologServiceProvider provides a ``monolog`` service. You can use it to The MonologServiceProvider provides a ``monolog`` service. You can use it to
add log entries for any logging level through ``addDebug()``, ``addInfo()``, add log entries for any logging level through ``addDebug()``, ``addInfo()``,
``addWarning()`` and ``addError()``: ``addWarning()`` and ``addError()``::
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
......
...@@ -14,7 +14,9 @@ Parameters ...@@ -14,7 +14,9 @@ Parameters
* **session.storage.options**: An array of options that is passed to the * **session.storage.options**: An array of options that is passed to the
constructor of the ``session.storage`` service. constructor of the ``session.storage`` service.
In case of the default ``NativeSessionStorage``, the possible options are: In case of the default `NativeSessionStorage
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.html>`_,
the possible options are:
* **name**: The cookie name (_SESS by default) * **name**: The cookie name (_SESS by default)
* **id**: The session id (null by default) * **id**: The session id (null by default)
...@@ -40,8 +42,9 @@ Services ...@@ -40,8 +42,9 @@ Services
data. data.
* **session.storage.handler**: A service that is used by the * **session.storage.handler**: A service that is used by the
``session.storage`` for data access. Defaults to a ``session.storage`` for data access. Defaults to a `FileSessionHandler
``FileSessionHandler`` storage handler. <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/FileSessionHandler.html>`_
storage handler.
Registering Registering
----------- -----------
......
...@@ -74,7 +74,7 @@ Registering ...@@ -74,7 +74,7 @@ Registering
Usage Usage
----- -----
The Swiftmailer provider provides a ``mailer`` service: The Swiftmailer provider provides a ``mailer`` service::
$app->post('/feedback', function () use ($app) { $app->post('/feedback', function () use ($app) {
$request = $app['request']; $request = $app['request'];
......
...@@ -216,7 +216,8 @@ don't want to mess with most of them. ...@@ -216,7 +216,8 @@ don't want to mess with most of them.
`unset($app['exception_handler'])`. `unset($app['exception_handler'])`.
* **logger**: A * **logger**: A
`http://api.symfony.com/master/Symfony/Component/HttpKernel/Log/LoggerInterface.html`_ `LoggerInterface
<http://api.symfony.com/master/Symfony/Component/HttpKernel/Log/LoggerInterface.html>`_
instance. By default, logging is disabled as the value is set to `null`. instance. By default, logging is disabled as the value is set to `null`.
When the Symfony2 Monolog bridge is installed, Monolog is automatically used When the Symfony2 Monolog bridge is installed, Monolog is automatically used
as the default logger. as the default logger.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment