Commit 77429a59 authored by Igor Wiedler's avatar Igor Wiedler

[session-update] Update all docs references to 2.1

parent dbc55d25
......@@ -12,11 +12,11 @@ Application
The application is the main interface to Silex. It
implements Symfony2's `HttpKernelInterface
<http://api.symfony.com/2.0/Symfony/Component/HttpKernel/HttpKernelInterface.html>`_,
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernelInterface.html>`_,
so you can pass a `Request
<http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Request.html>`_
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html>`_
to the ``handle`` method and it will return a `Response
<http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Response.html>`_.
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Response.html>`_.
It extends the ``Pimple`` service container, allowing
for flexibility on the outside as well as the inside. you
......@@ -24,9 +24,9 @@ could replace any service, and you are also able to read
them.
The application makes strong use of the `EventDispatcher
<http://api.symfony.com/2.0/Symfony/Component/EventDispatcher/EventDispatcher.html>`_
<http://api.symfony.com/master/Symfony/Component/EventDispatcher/EventDispatcher.html>`_
to hook into the Symfony2 `HttpKernel
<http://api.symfony.com/2.0/Symfony/Component/HttpKernel/HttpKernel.html>`_ events. This allows
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernel.html>`_ events. This allows
fetching the ``Request``, converting string responses into
``Response`` objects and handling Exceptions. We also use it
to dispatch some custom events like before/after filters and
......@@ -36,7 +36,7 @@ Controller
~~~~~~~~~~
The Symfony2 `Route
<http://api.symfony.com/2.0/Symfony/Component/Routing/Route.html>`_
<http://api.symfony.com/master/Symfony/Component/Routing/Route.html>`_
is actually quite powerful. Routes
can be named, which allows for URL generation. They can
also have requirements for the variable parts. In order
......@@ -49,7 +49,7 @@ ControllerCollection
~~~~~~~~~~~~~~~~~~~~
One of the goals of exposing the `RouteCollection
<http://api.symfony.com/2.0/Symfony/Component/Routing/RouteCollection.html>`_
<http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_
was to make it mutable, so providers could add stuff to it.
The challenge here is the fact that routes know nothing
about their name. The name only has meaning in context
......
......@@ -9,14 +9,14 @@ Parameters
* **http_cache.cache_dir**: The cache directory to store the HTTP cache data.
* **http_cache.options** (optional): An array of options for the `HttpCache
<http://api.symfony.com/2.0/Symfony/Component/HttpKernel/HttpCache/HttpCache.html>`_
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpCache/HttpCache.html>`_
constructor.
Services
--------
* **http_cache**: An instance of `HttpCache
<http://api.symfony.com/2.0/Symfony/Component/HttpKernel/HttpCache/HttpCache.html>`_,
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpCache/HttpCache.html>`_,
Registering
-----------
......
......@@ -31,11 +31,11 @@ Services
--------
* **session**: An instance of Symfony2's `Session
<http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Session.html>`_.
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Session.html>`_.
* **session.storage**: A service that is used for persistence of the
session data. Defaults to a `NativeSessionStorage
<http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.html>`_.
session data. Defaults to a `NativeFileSessionStorage
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/NativeFileSessionStorage.html>`_.
Registering
-----------
......
......@@ -23,16 +23,16 @@ Services
--------
* **translator**: An instance of `Translator
<http://api.symfony.com/2.0/Symfony/Component/Translation/Translator.html>`_,
<http://api.symfony.com/master/Symfony/Component/Translation/Translator.html>`_,
that is used for translation.
* **translator.loader**: An instance of an implementation of the translation
`LoaderInterface <http://api.symfony.com/2.0/Symfony/Component/Translation/Loader/LoaderInterface.html>`_,
`LoaderInterface <http://api.symfony.com/master/Symfony/Component/Translation/Loader/LoaderInterface.html>`_,
defaults to an `ArrayLoader
<http://api.symfony.com/2.0/Symfony/Component/Translation/Loader/ArrayLoader.html>`_.
<http://api.symfony.com/master/Symfony/Component/Translation/Loader/ArrayLoader.html>`_.
* **translator.message_selector**: An instance of `MessageSelector
<http://api.symfony.com/2.0/Symfony/Component/Translation/MessageSelector.html>`_.
<http://api.symfony.com/master/Symfony/Component/Translation/MessageSelector.html>`_.
Registering
-----------
......
......@@ -13,9 +13,9 @@ Services
--------
* **url_generator**: An instance of `UrlGenerator
<http://api.symfony.com/2.0/Symfony/Component/Routing/Generator/UrlGenerator.html>`_,
<http://api.symfony.com/master/Symfony/Component/Routing/Generator/UrlGenerator.html>`_,
using the `RouteCollection
<http://api.symfony.com/2.0/Symfony/Component/Routing/RouteCollection.html>`_
<http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_
that is provided through the ``routes`` service.
It has a ``generate`` method, which takes the route name as an argument,
followed by an array of route parameters.
......
......@@ -15,7 +15,7 @@ Services
--------
* **validator**: An instance of `Validator
<http://api.symfony.com/2.0/Symfony/Component/Validator/Validator.html>`_.
<http://api.symfony.com/master/Symfony/Component/Validator/Validator.html>`_.
* **validator.mapping.class_metadata_factory**: Factory for metadata loaders,
which can read validation constraint information from classes. Defaults to
......
......@@ -184,7 +184,7 @@ of them.
* **request**: Contains the current request object,
which is an instance of `Request
<http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Request.html>`_.
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html>`_.
It gives you access to ``GET``, ``POST`` parameters
and lots more!
......@@ -197,7 +197,7 @@ of them.
* **autoloader**: This service provides you with a
`UniversalClassLoader
<http://api.symfony.com/2.0/Symfony/Component/ClassLoader/UniversalClassLoader.html>`_
<http://api.symfony.com/master/Symfony/Component/ClassLoader/UniversalClassLoader.html>`_
that is already registered. You can register prefixes
and namespaces on it.
......@@ -206,10 +206,10 @@ of them.
$app['autoloader']->registerPrefix('Twig_', $app['twig.class_path']);
For more information, check out the `Symfony2 autoloader documentation
<http://symfony.com/doc/2.0/cookbook/tools/autoloader.html>`_.
<http://symfony.com/doc/current/components/class_loader.html>`_.
* **routes**: The `RouteCollection
<http://api.symfony.com/2.0/Symfony/Component/Routing/RouteCollection.html>`_
<http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_
that is used internally. You can add, modify, read
routes.
......@@ -218,17 +218,17 @@ of them.
chapter for more information.
* **dispatcher**: The `EventDispatcher
<http://api.symfony.com/2.0/Symfony/Component/EventDispatcher/EventDispatcher.html>`_
<http://api.symfony.com/master/Symfony/Component/EventDispatcher/EventDispatcher.html>`_
that is used internally. It is the core of the Symfony2
system and is used quite a bit by Silex.
* **resolver**: The `ControllerResolver
<http://api.symfony.com/2.0/Symfony/Component/HttpKernel/Controller/ControllerResolver.html>`_
<http://api.symfony.com/master/Symfony/Component/HttpKernel/Controller/ControllerResolver.html>`_
that is used internally. It takes care of executing the
controller with the right arguments.
* **kernel**: The `HttpKernel
<http://api.symfony.com/2.0/Symfony/Component/HttpKernel/HttpKernel.html>`_
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernel.html>`_
that is used internally. The HttpKernel is the heart of
Symfony2, it takes a Request as input and returns a
Response as output.
......
......@@ -174,12 +174,12 @@ It is pretty straightforward.
The current ``request`` is automatically injected by Silex to the Closure
thanks to the type hinting. It is an instance of `Request
<http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Request.html>`_,
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html>`_,
so you can fetch variables using the request ``get`` method.
Instead of returning a string we are returning an instance of
`Response
<http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Response.html>`_.
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Response.html>`_.
This allows setting an HTTP
status code, in this case it is set to ``201 Created``.
......
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