Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
77429a59
Commit
77429a59
authored
Feb 27, 2012
by
Igor Wiedler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[session-update] Update all docs references to 2.1
parent
dbc55d25
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
28 deletions
+28
-28
doc/internals.rst
doc/internals.rst
+7
-7
doc/providers/http_cache.rst
doc/providers/http_cache.rst
+2
-2
doc/providers/session.rst
doc/providers/session.rst
+3
-3
doc/providers/translation.rst
doc/providers/translation.rst
+4
-4
doc/providers/url_generator.rst
doc/providers/url_generator.rst
+2
-2
doc/providers/validator.rst
doc/providers/validator.rst
+1
-1
doc/services.rst
doc/services.rst
+7
-7
doc/usage.rst
doc/usage.rst
+2
-2
No files found.
doc/internals.rst
View file @
77429a59
...
...
@@ -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
...
...
doc/providers/http_cache.rst
View file @
77429a59
...
...
@@ -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
-----------
...
...
doc/providers/session.rst
View file @
77429a59
...
...
@@ -31,11 +31,11 @@ Services
--------
* **session**: An instance of Symfony2's `Session
<http://api.symfony.com/
2.0/Symfony/Component/HttpFoundat
ion/Session.html>`_.
<http://api.symfony.com/
master/Symfony/Component/HttpFoundation/Sess
ion/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/Nativ
eSessionStorage.html>`_.
session data. Defaults to a `Native
File
SessionStorage
<http://api.symfony.com/
master/Symfony/Component/HttpFoundation/Session/Storage/NativeFil
eSessionStorage.html>`_.
Registering
-----------
...
...
doc/providers/translation.rst
View file @
77429a59
...
...
@@ -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
-----------
...
...
doc/providers/url_generator.rst
View file @
77429a59
...
...
@@ -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.
...
...
doc/providers/validator.rst
View file @
77429a59
...
...
@@ -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
...
...
doc/services.rst
View file @
77429a59
...
...
@@ -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/auto
loader.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.
...
...
doc/usage.rst
View file @
77429a59
...
...
@@ -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``.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment