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
1c86d1a8
Commit
1c86d1a8
authored
Apr 20, 2018
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use https whenever possible
parent
c24aab49
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
102 additions
and
102 deletions
+102
-102
README.rst
README.rst
+3
-3
doc/cookbook/form_no_csrf.rst
doc/cookbook/form_no_csrf.rst
+2
-2
doc/cookbook/guard_authentication.rst
doc/cookbook/guard_authentication.rst
+1
-1
doc/cookbook/session_storage.rst
doc/cookbook/session_storage.rst
+3
-3
doc/internals.rst
doc/internals.rst
+8
-8
doc/intro.rst
doc/intro.rst
+1
-1
doc/providers/csrf.rst
doc/providers/csrf.rst
+2
-2
doc/providers/doctrine.rst
doc/providers/doctrine.rst
+3
-3
doc/providers/form.rst
doc/providers/form.rst
+2
-2
doc/providers/http_cache.rst
doc/providers/http_cache.rst
+6
-6
doc/providers/http_fragment.rst
doc/providers/http_fragment.rst
+1
-1
doc/providers/remember_me.rst
doc/providers/remember_me.rst
+1
-1
doc/providers/routing.rst
doc/providers/routing.rst
+2
-2
doc/providers/security.rst
doc/providers/security.rst
+10
-10
doc/providers/serializer.rst
doc/providers/serializer.rst
+6
-6
doc/providers/service_controller.rst
doc/providers/service_controller.rst
+1
-1
doc/providers/session.rst
doc/providers/session.rst
+13
-13
doc/providers/swiftmailer.rst
doc/providers/swiftmailer.rst
+2
-2
doc/providers/translation.rst
doc/providers/translation.rst
+4
-4
doc/providers/twig.rst
doc/providers/twig.rst
+9
-9
doc/providers/validator.rst
doc/providers/validator.rst
+3
-3
doc/services.rst
doc/services.rst
+7
-7
doc/testing.rst
doc/testing.rst
+3
-3
doc/usage.rst
doc/usage.rst
+7
-7
doc/web_servers.rst
doc/web_servers.rst
+1
-1
src/Silex/Provider/SerializerServiceProvider.php
src/Silex/Provider/SerializerServiceProvider.php
+1
-1
No files found.
README.rst
View file @
1c86d1a8
...
...
@@ -2,7 +2,7 @@ Silex, a simple Web Framework
=============================
**WARNING**: Silex is in maintenance mode only. Ends of life is set to June
2018. Read more on `Symfony's blog <http://symfony.com/blog/the-end-of-silex>`_.
2018. Read more on `Symfony's blog <http
s
://symfony.com/blog/the-end-of-silex>`_.
Silex is a PHP micro-framework to develop websites based on `Symfony
components`_:
...
...
@@ -62,8 +62,8 @@ License
Silex is licensed under the MIT license.
.. _Symfony components: http://symfony.com
.. _Composer: http://getcomposer.org
.. _Symfony components: http
s
://symfony.com
.. _Composer: http
s
://getcomposer.org
.. _PHPUnit: https://phpunit.de
.. _silex.zip: https://silex.symfony.com/download
.. _documentation: https://silex.symfony.com/documentation
...
...
doc/cookbook/form_no_csrf.rst
View file @
1c86d1a8
...
...
@@ -10,7 +10,7 @@ intend to submit.
You can find more details about CSRF Protection and CSRF token in the
`Symfony Book
<http://symfony.com/doc/current/book/forms.html#csrf-protection>`_.
<http
s
://symfony.com/doc/current/book/forms.html#csrf-protection>`_.
In some cases (for example, when embedding a form in an html email) you might
want not to use this protection. The easiest way to avoid this is to
...
...
@@ -33,4 +33,4 @@ This specific example showed how to change the ``csrf_protection`` in the
``$options`` parameter of the ``createBuilder()`` function. More of them could
be passed through this parameter, it is as simple as using the Symfony
``getDefaultOptions()`` method in your form classes. `See more here
<http://symfony.com/doc/current/book/forms.html#book-form-creating-form-classes>`_.
<http
s
://symfony.com/doc/current/book/forms.html#book-form-creating-form-classes>`_.
doc/cookbook/guard_authentication.rst
View file @
1c86d1a8
...
...
@@ -181,4 +181,4 @@ under different conditions:
# the homepage controller is executed: the page loads normally
For more details read the Symfony cookbook entry on
`How to Create a Custom Authentication System with Guard <http://symfony.com/doc/current/cookbook/security/guard-authentication.html>`_.
`How to Create a Custom Authentication System with Guard <http
s
://symfony.com/doc/current/cookbook/security/guard-authentication.html>`_.
doc/cookbook/session_storage.rst
View file @
1c86d1a8
...
...
@@ -7,10 +7,10 @@ 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 environment.
Symfony's `NativeSessionStorage
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.html>`_
<http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.html>`_
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>`_.
<http
s
://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.
...
...
@@ -86,4 +86,4 @@ PdoSessionStorage needs a database table with 3 columns:
You can find examples of SQL statements to create the session table in the
`Symfony cookbook
<http://symfony.com/doc/current/cookbook/configuration/pdo_session_storage.html#example-sql-statements>`_
<http
s
://symfony.com/doc/current/cookbook/configuration/pdo_session_storage.html#example-sql-statements>`_
doc/internals.rst
View file @
1c86d1a8
...
...
@@ -11,20 +11,20 @@ Application
The application is the main interface to Silex. It implements Symfony's
`HttpKernelInterface
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernelInterface.html>`_,
<http
s
://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernelInterface.html>`_,
so you can pass a `Request
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html>`_
<http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html>`_
to the ``handle`` method and it will return a `Response
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Response.html>`_.
<http
s
://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 could replace any service, and you are also
able to read them.
The application makes strong use of the `EventDispatcher
<http://api.symfony.com/master/Symfony/Component/EventDispatcher/EventDispatcher
<http
s
://api.symfony.com/master/Symfony/Component/EventDispatcher/EventDispatcher
.html>`_ to hook into the Symfony `HttpKernel
<http://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernel.html>`_
<http
s
://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 middlewares and errors.
...
...
@@ -33,7 +33,7 @@ Controller
~~~~~~~~~~
The Symfony `Route
<http://api.symfony.com/master/Symfony/Component/Routing/Route.html>`_ is
<http
s
://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 to allow
setting these through a nice interface, the ``match`` method (which is used by
...
...
@@ -44,7 +44,7 @@ ControllerCollection
~~~~~~~~~~~~~~~~~~~~
One of the goals of exposing the `RouteCollection
<http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_
<http
s
://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 of the ``RouteCollection`` and cannot be changed.
...
...
@@ -81,4 +81,4 @@ Following Symfony components are used by Silex:
* **EventDispatcher**: For hooking into the HttpKernel.
For more information, `check out the Symfony website <http://symfony.com/>`_.
For more information, `check out the Symfony website <http
s
://symfony.com/>`_.
doc/intro.rst
View file @
1c86d1a8
...
...
@@ -45,6 +45,6 @@ is sent back to the client.
Finally, the app is run. Visit ``/hello/world`` to see the result. It's really
that easy!
.. _Symfony: http://symfony.com/
.. _Symfony: http
s
://symfony.com/
.. _Pimple: https://pimple.symfony.com/
.. _Sinatra: http://www.sinatrarb.com/
doc/providers/csrf.rst
View file @
1c86d1a8
...
...
@@ -15,7 +15,7 @@ Services
* **csrf.token_manager**: An instance of an implementation of the
`CsrfTokenManagerInterface
<http://api.symfony.com/master/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.html>`_,
<http
s
://api.symfony.com/master/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.html>`_,
Registering
-----------
...
...
@@ -29,7 +29,7 @@ Registering
.. note::
Add the Symfony's `Security CSRF Component
<http://symfony.com/doc/current/components/security/index.html>`_ as a
<http
s
://symfony.com/doc/current/components/security/index.html>`_ as a
dependency:
.. code-block:: bash
...
...
doc/providers/doctrine.rst
View file @
1c86d1a8
...
...
@@ -2,7 +2,7 @@ Doctrine
========
The *DoctrineServiceProvider* provides integration with the `Doctrine DBAL
<http://www.doctrine-project.org/projects/dbal>`_ for easy database access
<http
s
://www.doctrine-project.org/projects/dbal>`_ for easy database access
(Doctrine ORM integration is **not** supplied).
Parameters
...
...
@@ -36,7 +36,7 @@ Parameters
specifies the port of the database to connect to.
These and additional options are described in detail in the `Doctrine DBAL
configuration documentation <http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html>`_.
configuration documentation <http
s
://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html>`_.
Services
--------
...
...
@@ -134,4 +134,4 @@ Using multiple connections::
});
For more information, consult the `Doctrine DBAL documentation
<http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/>`_.
<http
s
://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/>`_.
doc/providers/form.rst
View file @
1c86d1a8
...
...
@@ -13,7 +13,7 @@ Services
--------
* **form.factory**: An instance of `FormFactory
<http://api.symfony.com/master/Symfony/Component/Form/FormFactory.html>`_,
<http
s
://api.symfony.com/master/Symfony/Component/Form/FormFactory.html>`_,
that is used to build a form.
Registering
...
...
@@ -213,4 +213,4 @@ Traits
$app->namedForm($name, $data, $options, $type);
For more information, consult the `Symfony Forms documentation
<http://symfony.com/doc/current/forms.html>`_.
<http
s
://symfony.com/doc/current/forms.html>`_.
doc/providers/http_cache.rst
View file @
1c86d1a8
...
...
@@ -10,21 +10,21 @@ 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
/
master
/
Symfony
/
Component
/
HttpKernel
/
HttpCache
/
HttpCache
.
html
>
`_
<http
s
:
//
api
.
symfony
.
com
/
master
/
Symfony
/
Component
/
HttpKernel
/
HttpCache
/
HttpCache
.
html
>
`_
constructor.
Services
--------
* **http_cache**: An instance of `HttpCache
<http:
//
api
.
symfony
.
com
/
master
/
Symfony
/
Component
/
HttpKernel
/
HttpCache
/
HttpCache
.
html
>
`_.
<http
s
:
//
api
.
symfony
.
com
/
master
/
Symfony
/
Component
/
HttpKernel
/
HttpCache
/
HttpCache
.
html
>
`_.
* **http_cache.esi**: An instance of `Esi
<http:
//
api
.
symfony
.
com
/
master
/
Symfony
/
Component
/
HttpKernel
/
HttpCache
/
Esi
.
html
>
`_,
<http
s
:
//
api
.
symfony
.
com
/
master
/
Symfony
/
Component
/
HttpKernel
/
HttpCache
/
Esi
.
html
>
`_,
that implements the ESI capabilities to Request and Response instances.
* **http_cache.store**: An instance of `Store
<http:
//
api
.
symfony
.
com
/
master
/
Symfony
/
Component
/
HttpKernel
/
HttpCache
/
Store
.
html
>
`_,
<http
s
:
//
api
.
symfony
.
com
/
master
/
Symfony
/
Component
/
HttpKernel
/
HttpCache
/
Store
.
html
>
`_,
that implements all the logic for storing cache metadata (Request and Response
headers).
...
...
@@ -56,7 +56,7 @@ setting Response HTTP cache headers::
If you want Silex to trust the ``X-Forwarded-For*`` headers from your
reverse proxy at address $ip, you will need to whitelist it as documented
in `Trusting Proxies
<http:
//
symfony
.
com
/
doc
/
current
/
components
/
http_foundation
/
trusting_proxies
.
html
>
`_.
<http
s
:
//
symfony
.
com
/
doc
/
current
/
components
/
http_foundation
/
trusting_proxies
.
html
>
`_.
If you would be running Varnish in front of your application on the same machine::
...
...
@@ -125,4 +125,4 @@ overall performance::
Finally, check that your Web server does not override your caching strategy.
For more information, consult the `Symfony HTTP Cache documentation
<http:
//
symfony
.
com
/
doc
/
current
/
book
/
http_cache
.
html
>
`_.
<http
s
:
//
symfony
.
com
/
doc
/
current
/
book
/
http_cache
.
html
>
`_.
doc/providers/http_fragment.rst
View file @
1c86d1a8
...
...
@@ -20,7 +20,7 @@ Services
--------
* **fragment.handler**: An instance of `FragmentHandler
<http://api.symfony.com/master/Symfony/Component/HttpKernel/Fragment/FragmentHandler.html>`_.
<http
s
://api.symfony.com/master/Symfony/Component/HttpKernel/Fragment/FragmentHandler.html>`_.
* **fragment.renderers**: An array of fragment renderers (by default, the
inline, ESI, and HInclude renderers are pre-configured).
...
...
doc/providers/remember_me.rst
View file @
1c86d1a8
...
...
@@ -65,5 +65,5 @@ Options
* **remember_me_parameter**: Name of the request parameter enabling remember_me
on login. To add the checkbox to the login form. You can find more
information in the `Symfony cookbook
<http://symfony.com/doc/current/cookbook/security/remember_me.html>`_
<http
s
://symfony.com/doc/current/cookbook/security/remember_me.html>`_
(default: ``_remember_me``).
doc/providers/routing.rst
View file @
1c86d1a8
...
...
@@ -14,9 +14,9 @@ Services
--------
* **url_generator**: An instance of `UrlGenerator
<http://api.symfony.com/master/Symfony/Component/Routing/Generator/UrlGenerator.html>`_,
<http
s
://api.symfony.com/master/Symfony/Component/Routing/Generator/UrlGenerator.html>`_,
using the `RouteCollection
<http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_
<http
s
://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/security.rst
View file @
1c86d1a8
...
...
@@ -27,11 +27,11 @@ Services
* **security.authentication_manager**: An instance of
`AuthenticationProviderManager
<http://api.symfony.com/master/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.html>`_,
<http
s
://api.symfony.com/master/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.html>`_,
responsible for authentication.
* **security.access_manager**: An instance of `AccessDecisionManager
<http://api.symfony.com/master/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.html>`_,
<http
s
://api.symfony.com/master/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.html>`_,
responsible for authorization.
* **security.session_strategy**: Define the session strategy used for
...
...
@@ -98,7 +98,7 @@ Usage
The Symfony Security component is powerful. To learn more about it, read the
`Symfony Security documentation
<http://symfony.com/doc/current/security.html>`_.
<http
s
://symfony.com/doc/current/security.html>`_.
.. tip::
...
...
@@ -125,7 +125,7 @@ is known, you can get it with a call to ``getUser()``::
The user can be a string, an object with a ``__toString()`` method, or an
instance of `UserInterface
<http://api.symfony.com/master/Symfony/Component/Security/Core/User/UserInterface.html>`_.
<http
s
://api.symfony.com/master/Symfony/Component/Security/Core/User/UserInterface.html>`_.
Securing a Path with HTTP Authentication
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
@@ -151,7 +151,7 @@ entry defines valid users.
If you want to restrict the firewall by more than the URL pattern (like the
HTTP method, the client IP, the hostname, or any Request attributes), use an
instance of a `RequestMatcher
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/RequestMatcher.html>`_
<http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/RequestMatcher.html>`_
for the ``pattern`` option::
use Symfony\Component\HttpFoundation\RequestMatcher;
...
...
@@ -186,7 +186,7 @@ generate a valid encoded password from a raw password, use the
When the user is authenticated, the user stored in the token is an instance of
`User
<http://api.symfony.com/master/Symfony/Component/Security/Core/User/User.html>`_
<http
s
://api.symfony.com/master/Symfony/Component/Security/Core/User/User.html>`_
.. caution::
...
...
@@ -500,7 +500,7 @@ the case, the user will be automatically redirected).
.. note::
The first argument can also be a `RequestMatcher
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/RequestMatcher.html>`_
<http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/RequestMatcher.html>`_
instance.
Defining a custom User Provider
...
...
@@ -511,7 +511,7 @@ a personal website, but you can override this default mechanism with you own.
The ``users`` setting can be defined as a service or a service id that returns
an instance of `UserProviderInterface
<http://api.symfony.com/master/Symfony/Component/Security/Core/User/UserProviderInterface.html>`_::
<http
s
://api.symfony.com/master/Symfony/Component/Security/Core/User/UserProviderInterface.html>`_::
'users' => function () use ($app) {
return new UserProvider($app['db']);
...
...
@@ -565,7 +565,7 @@ store the users::
In this example, instances of the default ``User`` class are created for the
users, but you can define your own class; the only requirement is that the
class must implement `UserInterface
<http://api.symfony.com/master/Symfony/Component/Security/Core/User/UserInterface.html>`_
<http
s
://api.symfony.com/master/Symfony/Component/Security/Core/User/UserInterface.html>`_
And here is the code that you can use to create the database schema and some
sample users::
...
...
@@ -752,4 +752,4 @@ Traits
$app['route_class'] = 'MyRoute';
.. _cookbook: http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html
.. _cookbook: http
s
://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html
doc/providers/serializer.rst
View file @
1c86d1a8
...
...
@@ -12,17 +12,17 @@ Services
--------
* **serializer**: An instance of `Symfony\\Component\\Serializer\\Serializer
<http://api.symfony.com/master/Symfony/Component/Serializer/Serializer.html>`_.
<http
s
://api.symfony.com/master/Symfony/Component/Serializer/Serializer.html>`_.
* **serializer.encoders**: `Symfony\\Component\\Serializer\\Encoder\\JsonEncoder
<http://api.symfony.com/master/Symfony/Component/Serializer/Encoder/JsonEncoder.html>`_
<http
s
://api.symfony.com/master/Symfony/Component/Serializer/Encoder/JsonEncoder.html>`_
and `Symfony\\Component\\Serializer\\Encoder\\XmlEncoder
<http://api.symfony.com/master/Symfony/Component/Serializer/Encoder/XmlEncoder.html>`_.
<http
s
://api.symfony.com/master/Symfony/Component/Serializer/Encoder/XmlEncoder.html>`_.
* **serializer.normalizers**: `Symfony\\Component\\Serializer\\Normalizer\\CustomNormalizer
<http://api.symfony.com/master/Symfony/Component/Serializer/Normalizer/CustomNormalizer.html>`_
<http
s
://api.symfony.com/master/Symfony/Component/Serializer/Normalizer/CustomNormalizer.html>`_
and `Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer
<http://api.symfony.com/master/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.html>`_.
<http
s
://api.symfony.com/master/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.html>`_.
Registering
-----------
...
...
@@ -34,7 +34,7 @@ Registering
.. note::
Add the Symfony's `Serializer Component
<http://symfony.com/doc/current/components/serializer.html>`_ as a
<http
s
://symfony.com/doc/current/components/serializer.html>`_ as a
dependency:
.. code-block:: bash
...
...
doc/providers/service_controller.rst
View file @
1c86d1a8
...
...
@@ -78,7 +78,7 @@ tested/specced. You may also notice that the only external dependency is on
``Symfony\Component\HttpFoundation\JsonResponse``, meaning this controller could
easily be used in a Symfony (full stack) application, or potentially with other
applications or frameworks that know how to handle a `Symfony/HttpFoundation
<http://symfony.com/doc/master/components/http_foundation/introduction.html>`_
<http
s
://symfony.com/doc/master/components/http_foundation/introduction.html>`_
``Response`` object.
.. code-block:: php
...
...
doc/providers/session.rst
View file @
1c86d1a8
...
...
@@ -15,7 +15,7 @@ Parameters
constructor of the ``session.storage`` service.
In case of the default `NativeSessionStorage
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.html>`_,
<http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.html>`_,
the most useful options are:
* **name**: The cookie name (_SESS by default)
...
...
@@ -30,7 +30,7 @@ Parameters
seconds (30 minutes). To override this, set the ``lifetime`` option.
For a full list of available options, read the `PHP
<http
://
php.net/session.configuration>`_ official documentation.
<http
s://secure.
php.net/session.configuration>`_ official documentation.
* **session.test**: Whether to simulate sessions or not (useful when writing
functional tests).
...
...
@@ -45,14 +45,14 @@ Services
--------
* **session**: An instance of Symfony's `Session
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Session.html>`_.
<http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Session.html>`_.
* **session.storage**: A service that is used for persistence of the session
data.
* **session.storage.handler**: A service that is used by the
``session.storage`` for data access. Defaults to a `NativeFileSessionHandler
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.html>`_
<http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.html>`_
storage handler.
Registering
...
...
@@ -69,15 +69,15 @@ The default session handler is ``NativeFileSessionHandler``. However, there are
multiple handlers available for use by setting ``session.storage.handler`` to
an instance of one of the following handler objects:
* `LegacyPdoSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.html>`_
* `MemcacheSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.html>`_
* `MemcachedSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.html>`_
* `MongoDbSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.html>`_
* `NativeFileSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.html>`_
* `NativeSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.html>`_
* `NullSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.html>`_
* `PdoSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.html>`_
* `WriteCheckSessionHandler <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/WriteCheckSessionHandler.html>`_
* `LegacyPdoSessionHandler <http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.html>`_
* `MemcacheSessionHandler <http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.html>`_
* `MemcachedSessionHandler <http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.html>`_
* `MongoDbSessionHandler <http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.html>`_
* `NativeFileSessionHandler <http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.html>`_
* `NativeSessionHandler <http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.html>`_
* `NullSessionHandler <http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.html>`_
* `PdoSessionHandler <http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.html>`_
* `WriteCheckSessionHandler <http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/Session/Storage/Handler/WriteCheckSessionHandler.html>`_
Usage
-----
...
...
doc/providers/swiftmailer.rst
View file @
1c86d1a8
...
...
@@ -2,7 +2,7 @@ Swiftmailer
===========
The *SwiftmailerServiceProvider* provides a service for sending email through
the `Swift Mailer <http
://swiftmailer.org
>`_ library.
the `Swift Mailer <http
s://swiftmailer.symfony.com
>`_ library.
You can use the ``mailer`` service to send messages easily. By default, it
will attempt to send emails through SMTP.
...
...
@@ -153,4 +153,4 @@ Traits
->setBody($request->get('message')));
For more information, check out the `Swift Mailer documentation
<http
://swiftmailer.org
>`_.
<http
s://swiftmailer.symfony.com
>`_.
doc/providers/translation.rst
View file @
1c86d1a8
...
...
@@ -23,17 +23,17 @@ Services
--------
* **translator**: An instance of `Translator
<http://api.symfony.com/master/Symfony/Component/Translation/Translator.html>`_,
<http
s
://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/master/Symfony/Component/Translation/Loader/LoaderInterface.html>`_,
<http
s
://api.symfony.com/master/Symfony/Component/Translation/Loader/LoaderInterface.html>`_,
defaults to an `ArrayLoader
<http://api.symfony.com/master/Symfony/Component/Translation/Loader/ArrayLoader.html>`_.
<http
s
://api.symfony.com/master/Symfony/Component/Translation/Loader/ArrayLoader.html>`_.
* **translator.message_selector**: An instance of `MessageSelector
<http://api.symfony.com/master/Symfony/Component/Translation/MessageSelector.html>`_.
<http
s
://api.symfony.com/master/Symfony/Component/Translation/MessageSelector.html>`_.
Registering
-----------
...
...
doc/providers/twig.rst
View file @
1c86d1a8
...
...
@@ -26,15 +26,15 @@ Parameters
* **twig.date.format** (optional): Default format used by the ``date``
filter. The format string must conform to the format accepted by
`date() <http
://www
.php.net/date>`_.
`date() <http
s://secure
.php.net/date>`_.
* **twig.date.interval_format** (optional): Default format used by the
``date`` filter when the filtered data is of type `DateInterval <http
://www
.php.net/DateInterval>`_.
``date`` filter when the filtered data is of type `DateInterval <http
s://secure
.php.net/DateInterval>`_.
The format string must conform to the format accepted by
`DateInterval::format() <http
://www
.php.net/DateInterval.format>`_.
`DateInterval::format() <http
s://secure
.php.net/DateInterval.format>`_.
* **twig.date.timezone** (optional): Default timezone used when formatting
dates. If set to ``null`` the timezone returned by `date_default_timezone_get() <http
://www
.php.net/date_default_timezone_get>`_
dates. If set to ``null`` the timezone returned by `date_default_timezone_get() <http
s://secure
.php.net/date_default_timezone_get>`_
is used.
* **twig.number_format.decimals** (optional): Default number of decimals
...
...
@@ -99,7 +99,7 @@ additional capabilities.
* Access to the ``path()`` and ``url()`` functions. You can find more
information in the `Symfony Routing documentation
<http://symfony.com/doc/current/book/routing.html#generating-urls-from-a-template>`_:
<http
s
://symfony.com/doc/current/book/routing.html#generating-urls-from-a-template>`_:
.. code-block:: jinja
...
...
@@ -116,7 +116,7 @@ Translations Support
If you are using the ``TranslationServiceProvider``, you will get the
``trans()`` and ``transchoice()`` functions for translation in Twig templates.
You can find more information in the `Symfony Translation documentation
<http://symfony.com/doc/current/book/translation.html#twig-templates>`_.
<http
s
://symfony.com/doc/current/book/translation.html#twig-templates>`_.
Form Support
~~~~~~~~~~~~
...
...
@@ -124,7 +124,7 @@ Form Support
If you are using the ``FormServiceProvider``, you will get a set of helpers for
working with forms in templates. You can find more information in the `Symfony
Forms reference
<http://symfony.com/doc/current/reference/forms/twig_reference.html>`_.
<http
s
://symfony.com/doc/current/reference/forms/twig_reference.html>`_.
Security Support
~~~~~~~~~~~~~~~~
...
...
@@ -132,7 +132,7 @@ Security Support
If you are using the ``SecurityServiceProvider``, you will have access to the
``is_granted()`` function in templates. You can find more information in the
`Symfony Security documentation
<http://symfony.com/doc/current/book/security.html#access-control-in-templates>`_.
<http
s
://symfony.com/doc/current/book/security.html#access-control-in-templates>`_.
Web Link Support
~~~~~~~~~~~~~~~~
...
...
@@ -147,7 +147,7 @@ Global Variable
~~~~~~~~~~~~~~~
When the Twig bridge is available, the ``global`` variable refers to an
instance of `AppVariable <http://api.symfony.com/master/Symfony/Bridge/Twig/AppVariable.html>`_.
instance of `AppVariable <http
s
://api.symfony.com/master/Symfony/Bridge/Twig/AppVariable.html>`_.
It gives access to the following methods:
.. code-block:: jinja
...
...
doc/providers/validator.rst
View file @
1c86d1a8
...
...
@@ -16,13 +16,13 @@ Parameters
* **validator.object_initializers** (optional): An array of object initializers.
See `the relevant Validation documentation
<http://symfony.com/doc/current/reference/dic_tags.html#validator-initializer>`_.
<http
s
://symfony.com/doc/current/reference/dic_tags.html#validator-initializer>`_.
Services
--------
* **validator**: An instance of `Validator
<http://api.symfony.com/master/Symfony/Component/Validator/ValidatorInterface.html>`_.
<http
s
://api.symfony.com/master/Symfony/Component/Validator/ValidatorInterface.html>`_.
* **validator.mapping.class_metadata_factory**: Factory for metadata loaders,
which can read validation constraint information from classes. Defaults to
...
...
@@ -221,4 +221,4 @@ provider and register the messages under the ``validators`` domain::
);
For more information, consult the `Symfony Validation documentation
<http://symfony.com/doc/master/book/validation.html>`_.
<http
s
://symfony.com/doc/master/book/validation.html>`_.
doc/services.rst
View file @
1c86d1a8
...
...
@@ -197,7 +197,7 @@ Core services
Silex defines a range of services.
* **request_stack**: Controls the lifecycle of requests, an instance of
`RequestStack <http://api.symfony.com/master/Symfony/Component/HttpFoundation/RequestStack.html>`_.
`RequestStack <http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/RequestStack.html>`_.
It gives you access to ``GET``, ``POST`` parameters and lots more!
Example usage::
...
...
@@ -209,13 +209,13 @@ Silex defines a range of services.
or an error handler.
* **routes**: The `RouteCollection
<http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_
<http
s
://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_
that is used internally. You can add, modify, read routes.
* **url_generator**: An instance of `UrlGenerator
<http://api.symfony.com/master/Symfony/Component/Routing/Generator/UrlGenerator.html>`_,
<http
s
://api.symfony.com/master/Symfony/Component/Routing/Generator/UrlGenerator.html>`_,
using the `RouteCollection
<http://api.symfony.com/master/Symfony/Component/Routing/RouteCollection.html>`_
<http
s
://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.
...
...
@@ -224,17 +224,17 @@ Silex defines a range of services.
Check the :doc:`Internals chapter <internals>` for more information.
* **dispatcher**: The `EventDispatcher
<http://api.symfony.com/master/Symfony/Component/EventDispatcher/EventDispatcher.html>`_
<http
s
://api.symfony.com/master/Symfony/Component/EventDispatcher/EventDispatcher.html>`_
that is used internally. It is the core of the Symfony system and is used
quite a bit by Silex.
* **resolver**: The `ControllerResolver
<http://api.symfony.com/master/Symfony/Component/HttpKernel/Controller/ControllerResolver.html>`_
<http
s
://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/master/Symfony/Component/HttpKernel/HttpKernel.html>`_
<http
s
://api.symfony.com/master/Symfony/Component/HttpKernel/HttpKernel.html>`_
that is used internally. The HttpKernel is the heart of Symfony, it takes a
Request as input and returns a Response as output.
...
...
doc/testing.rst
View file @
1c86d1a8
...
...
@@ -18,7 +18,7 @@ test your application in usually under a second by running a single command.
For more information on functional testing, unit testing, and automated
software tests in general, check out `PHPUnit
<https://github.com/sebastianbergmann/phpunit>`_ and `Bulat Shakirzyanov's talk
on Clean Code <http://www.slideshare.net/avalanche123/clean-code-5609451>`_.
on Clean Code <http
s
://www.slideshare.net/avalanche123/clean-code-5609451>`_.
PHPUnit
-------
...
...
@@ -159,7 +159,7 @@ application.
You can find some documentation for it in `the client section of the
testing chapter of the Symfony documentation
<http://symfony.com/doc/current/book/testing.html#the-test-client>`_.
<http
s
://symfony.com/doc/current/book/testing.html#the-test-client>`_.
Crawler
~~~~~~~
...
...
@@ -171,7 +171,7 @@ using CSS expressions and lots more.
You can find some documentation for it in `the crawler section of the testing
chapter of the Symfony documentation
<http://symfony.com/doc/current/book/testing.html#the-test-client>`_.
<http
s
://symfony.com/doc/current/book/testing.html#the-test-client>`_.
Configuration
-------------
...
...
doc/usage.rst
View file @
1c86d1a8
...
...
@@ -732,7 +732,7 @@ will create a ``BinaryFileResponse`` response for you::
To further customize the response before returning it, check the API doc for
`Symfony\Component\HttpFoundation\BinaryFileResponse
<http://api.symfony.com/master/Symfony/Component/HttpFoundation/BinaryFileResponse.html>`_::
<http
s
://api.symfony.com/master/Symfony/Component/HttpFoundation/BinaryFileResponse.html>`_::
return $app
->sendFile('/base/path/' . $path)
...
...
@@ -812,9 +812,9 @@ Cross-Site-Scripting attacks.
return $app->json(array('name' => $name));
});
.. _Silex Skeleton: http://github.com/silexphp/Silex-Skeleton
.. _Composer:
http
://getcomposer.org/
.. _Request:
http
://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html
.. _Response:
http
://api.symfony.com/master/Symfony/Component/HttpFoundation/Response.html
.. _Monolog: https://github.com/Seldaek/monolog
.. _Expression: https://symfony.com/doc/current/book/routing.html#completely-customized-route-matching-with-conditions
.. _Silex Skeleton: http
s
://github.com/silexphp/Silex-Skeleton
.. _Composer:
https
://getcomposer.org/
.. _Request:
https
://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html
.. _Response:
https
://api.symfony.com/master/Symfony/Component/HttpFoundation/Response.html
.. _Monolog:
https://github.com/Seldaek/monolog
.. _Expression:
https://symfony.com/doc/current/book/routing.html#completely-customized-route-matching-with-conditions
doc/web_servers.rst
View file @
1c86d1a8
...
...
@@ -149,7 +149,7 @@ point:
"^(/[^\?]*)(\?.*)?" => "/index.php$1$2"
)
.. _FallbackResource directive: http://www.adayinthelifeof.nl/2012/01/21/apaches-fallbackresource-your-new-htaccess-command/
.. _FallbackResource directive: http
s
://www.adayinthelifeof.nl/2012/01/21/apaches-fallbackresource-your-new-htaccess-command/
PHP
---
...
...
src/Silex/Provider/SerializerServiceProvider.php
View file @
1c86d1a8
...
...
@@ -30,7 +30,7 @@ class SerializerServiceProvider implements ServiceProviderInterface
/**
* {@inheritdoc}
*
* This method registers a serializer service. {@link http://api.symfony.com/master/Symfony/Component/Serializer/Serializer.html
* This method registers a serializer service. {@link http
s
://api.symfony.com/master/Symfony/Component/Serializer/Serializer.html
* The service is provided by the Symfony Serializer component}.
*/
public
function
register
(
Container
$app
)
...
...
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