diff --git a/doc/cookbook/sub_requests.rst b/doc/cookbook/sub_requests.rst index bed6361409c67e378a99330f88c78c677d6ee876..31f21b743353f7ebecac79581ccde5075afb283b 100644 --- a/doc/cookbook/sub_requests.rst +++ b/doc/cookbook/sub_requests.rst @@ -32,8 +32,8 @@ By calling ``handle``, you can make a sub-request manually. Here's an example:: $response = $app->handle($subRequest, HttpKernelInterface::SUB_REQUEST, false); There's some more things that you need to keep in mind though. In most cases -you will want to forward some parts of the current master request to the sub- -request. That includes: Cookies, server information, session. +you will want to forward some parts of the current master request to the +sub-request. That includes: Cookies, server information, session. Here is a more advanced example that forwards said information (``$request`` holds the master request):: diff --git a/doc/providers/form.rst b/doc/providers/form.rst index a6ea0593eeba553df744c12319b90decd0c0d702..4f481dbd14f278749fa5c880c2bc8727413cb696 100644 --- a/doc/providers/form.rst +++ b/doc/providers/form.rst @@ -127,8 +127,7 @@ example:: return $app['twig']->render('index.twig', array('form' => $form->createView())); }); -And here is the ``index.twig`` form template (requires ``symfony/twig- -bridge``): +And here is the ``index.twig`` form template (requires ``symfony/twig-bridge``): .. code-block:: jinja diff --git a/doc/providers/monolog.rst b/doc/providers/monolog.rst index e95a03742be354cde14513f8c932e04a38a37e37..314617fd95aa6ef429f5f8653fc5f3cef787f4bd 100644 --- a/doc/providers/monolog.rst +++ b/doc/providers/monolog.rst @@ -13,7 +13,7 @@ Parameters * **monolog.logfile**: File where logs are written to. -* **monolog.level** (optional): Level of logging defaults +* **monolog.level** (optional): Level of logging, defaults to ``DEBUG``. Must be one of ``Logger::DEBUG``, ``Logger::INFO``, ``Logger::WARNING``, ``Logger::ERROR``. ``DEBUG`` will log everything, ``INFO`` will log everything except ``DEBUG``, diff --git a/doc/providers/serializer.rst b/doc/providers/serializer.rst index 62aecf5e868fc4ad43e1768a20fd5a3448ecefe2..ed0ebf5d253917686c2c415659087762c8d47cbb 100644 --- a/doc/providers/serializer.rst +++ b/doc/providers/serializer.rst @@ -41,22 +41,22 @@ The ``SerializerServiceProvider`` provider provides a ``serializer`` service: use Silex\Application; use Silex\Provider\SerializerServiceProvider; use Symfony\Component\HttpFoundation\Response; - + $app = new Application(); - + $app->register(new SerializerServiceProvider()); - + // only accept content types supported by the serializer via the assert method. $app->get("/pages/{id}.{_format}", function ($id) use ($app) { // assume a page_repository service exists that returns Page objects. The // object returned has getters and setters exposing the state. $page = $app['page_repository']->find($id); $format = $app['request']->getRequestFormat(); - + if (!$page instanceof Page) { $app->abort("No page found for id: $id"); } - + return new Response($app['serializer']->serialize($page, $format), 200, array( "Content-Type" => $app['request']->getMimeType($format) )); diff --git a/doc/usage.rst b/doc/usage.rst index 1229d941ef5d42e0ae0564048e629ab4e857e497..89757a3d726683d15cdbe9c624bd8c1c55d67748 100644 --- a/doc/usage.rst +++ b/doc/usage.rst @@ -462,7 +462,7 @@ the defaults for new controllers. .. note:: The global configuration does not apply to controller providers you might - mount as they have their own global configuration (read the + mount as they have their own global configuration (read the :doc:`dedicated chapter<organizing_controllers>` for more information). Error handlers