Skip to content

fixed some file extensions #1625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions cookbook/configuration/external_parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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::
Expand Down
2 changes: 1 addition & 1 deletion cookbook/configuration/pdo_session_storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
10 changes: 5 additions & 5 deletions cookbook/service_container/event_listener.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -61,19 +61,19 @@ using a special "tag":

.. code-block:: xml

<!-- app/config/config.yml -->
<!-- app/config/config.xml -->
<service id="kernel.listener.your_listener_name" class="Acme\DemoBundle\Listener\AcmeExceptionListener">
<tag name="kernel.event_listener" event="kernel.exception" method="onKernelException" />
</service>

.. 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
Expand Down