From 2e6308c208f5f18c26b207bd4293aa3e7e70f7ef Mon Sep 17 00:00:00 2001 From: Bilal Amarni Date: Fri, 10 Aug 2012 12:30:26 +0200 Subject: [PATCH] fixed some file extensions --- .../configuration/external_parameters.rst | 22 +++++++++---------- .../configuration/pdo_session_storage.rst | 2 +- cookbook/service_container/event_listener.rst | 10 ++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/cookbook/configuration/external_parameters.rst b/cookbook/configuration/external_parameters.rst index 3546267ccb5..d5bed69dd67 100644 --- a/cookbook/configuration/external_parameters.rst +++ b/cookbook/configuration/external_parameters.rst @@ -4,8 +4,8 @@ How to Set External Parameters in the Service Container ======================================================= -In the chapter :doc:`/cookbook/configuration/environments`, you learned how -to manage your application configuration. At times, it may benefit your application +In the chapter :doc:`/cookbook/configuration/environments`, you learned how +to manage your application configuration. At times, it may benefit your application to store certain credentials outside of your project code. Database configuration is one such example. The flexibility of the symfony service container allows you to easily do this. @@ -38,16 +38,16 @@ the following ``VirtualHost`` configuration: .. note:: - The example above is for an Apache configuration, using the `SetEnv`_ + The example above is for an Apache configuration, using the `SetEnv`_ directive. However, this will work for any web server which supports the setting of environment variables. - + Also, in order for your console to work (which does not use Apache), you must export these as shell variables. On a Unix system, you can run the following: - + .. code-block:: bash - + $ export SYMFONY__DATABASE__USER=user $ export SYMFONY__DATABASE__PASSWORD=secret @@ -116,18 +116,18 @@ key, and define the type as ``constant``. This only works for XML configuration. If you're *not* using XML, simply import an XML file to take advantage of this functionality: - + .. code-block:: yaml - - // app/config/config.yml + + # app/config/config.yml imports: - { resource: parameters.xml } Miscellaneous Configuration --------------------------- -The ``imports`` directive can be used to pull in parameters stored elsewhere. -Importing a PHP file gives you the flexibility to add whatever is needed +The ``imports`` directive can be used to pull in parameters stored elsewhere. +Importing a PHP file gives you the flexibility to add whatever is needed in the container. The following imports a file named ``parameters.php``. .. configuration-block:: diff --git a/cookbook/configuration/pdo_session_storage.rst b/cookbook/configuration/pdo_session_storage.rst index 5d0cffc4c88..43a12b89c59 100644 --- a/cookbook/configuration/pdo_session_storage.rst +++ b/cookbook/configuration/pdo_session_storage.rst @@ -75,7 +75,7 @@ configuration format of your choice): .. code-block:: php - // app/config/config.yml + // app/config/config.php use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; diff --git a/cookbook/service_container/event_listener.rst b/cookbook/service_container/event_listener.rst index 9c47470af2d..98012870f55 100644 --- a/cookbook/service_container/event_listener.rst +++ b/cookbook/service_container/event_listener.rst @@ -5,8 +5,8 @@ How to create an Event Listener =============================== Symfony has various events and hooks that can be used to trigger custom -behavior in your application. Those events are thrown by the HttpKernel -component and can be viewed in the :class:`Symfony\\Component\\HttpKernel\\KernelEvents` class. +behavior in your application. Those events are thrown by the HttpKernel +component and can be viewed in the :class:`Symfony\\Component\\HttpKernel\\KernelEvents` class. To hook into an event and add your own custom logic, you have to create a service that will act as an event listener on that event. In this entry, @@ -61,19 +61,19 @@ using a special "tag": .. code-block:: xml - + .. code-block:: php - // app/config/config.yml + // app/config/config.php $container ->register('kernel.listener.your_listener_name', 'Acme\DemoBundle\Listener\AcmeExceptionListener') ->addTag('kernel.event_listener', array('event' => 'kernel.exception', 'method' => 'onKernelException')) ; - + .. note:: There is an additional tag option ``priority`` that is optional and defaults