Skip to content

Commit

Permalink
minor #3829 [Components] consistent headlines (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

[Components] consistent headlines

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets |

This is a follow-up of #3765.

Commits
-------

0586ec4 [Components] consistent headlines
  • Loading branch information
weaverryan committed May 9, 2014
2 parents 54e0882 + 0586ec4 commit 09d6ca1
Show file tree
Hide file tree
Showing 33 changed files with 86 additions and 86 deletions.
2 changes: 1 addition & 1 deletion components/config/caching.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. index::
single: Config; Caching based on resources

Caching based on resources
Caching Based on Resources
==========================

When all configuration resources are loaded, you may want to process the configuration
Expand Down
30 changes: 15 additions & 15 deletions components/config/definition.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. index::
single: Config; Defining and processing configuration values

Defining and processing configuration values
Defining and Processing Configuration Values
============================================

Validating configuration values
Validating Configuration Values
-------------------------------

After loading configuration values from all kinds of resources, the values
Expand Down Expand Up @@ -38,7 +38,7 @@ they are when first encountered. Also, some keys are only available when
another key has a specific value (in the sample configuration above: the
``memory`` key only makes sense when the ``driver`` is ``sqlite``).

Defining a hierarchy of configuration values using the TreeBuilder
Defining a Hierarchy of Configuration Values Using the TreeBuilder
------------------------------------------------------------------

All the rules concerning configuration values can be defined using the
Expand Down Expand Up @@ -66,10 +66,10 @@ should be returned from a custom ``Configuration`` class which implements the
}
}

Adding node definitions to the tree
Adding Node Definitions to the Tree
-----------------------------------

Variable nodes
Variable Nodes
~~~~~~~~~~~~~~

A tree contains node definitions which can be laid out in a semantic way.
Expand All @@ -91,7 +91,7 @@ The root node itself is an array node, and has children, like the boolean
node ``auto_connect`` and the scalar node ``default_connection``. In general:
after defining a node, a call to ``end()`` takes you one step up in the hierarchy.

Node type
Node Type
~~~~~~~~~

It is possible to validate the type of a provided value by using the appropriate
Expand All @@ -108,7 +108,7 @@ node definition. Node type are available for:
and are created with ``node($name, $type)`` or their associated shortcut
``xxxxNode($name)`` method.

Numeric node constraints
Numeric Node Constraints
~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.2
Expand All @@ -133,7 +133,7 @@ allowing to validate the value::
->end()
;

Enum nodes
Enum Nodes
~~~~~~~~~~

.. versionadded:: 2.1
Expand All @@ -152,7 +152,7 @@ values::

This will restrict the ``gender`` option to be either ``male`` or ``female``.

Array nodes
Array Nodes
~~~~~~~~~~~

It is possible to add a deeper level to the hierarchy, by adding an array
Expand Down Expand Up @@ -193,7 +193,7 @@ inside the current node. According to the prototype definition in the example
above, it is possible to have multiple connection arrays (containing a ``driver``,
``host``, etc.).

Array node options
Array Node Options
~~~~~~~~~~~~~~~~~~

Before defining the children of an array node, you can provide options like:
Expand Down Expand Up @@ -236,7 +236,7 @@ In XML, each ``parameters`` node would have a ``name`` attribute (along with
the final array. The ``useAttributeAsKey`` is useful for normalizing how
arrays are specified between different formats like XML and YAML.

Default and required values
Default and required Values
---------------------------

For all node types, it is possible to define default values and replacement
Expand Down Expand Up @@ -316,7 +316,7 @@ you can take advantage of the shortcut
The ``canBeDisabled`` method looks about the same except that the section
would be enabled by default.

Merging options
Merging Options
---------------

Extra options concerning the merge process may be provided. For arrays:
Expand All @@ -330,7 +330,7 @@ For all nodes:
``cannotBeOverwritten()``
don’t let other configuration arrays overwrite an existing value for this node

Appending sections
Appending Sections
------------------

If you have a complex configuration to validate then the tree can grow to
Expand Down Expand Up @@ -502,7 +502,7 @@ By changing a string value into an associative array with ``name`` as the key::
->end()
;

Validation rules
Validation Rules
----------------

More advanced validation rules can be provided using the
Expand Down Expand Up @@ -548,7 +548,7 @@ Usually, "then" is a closure. Its return value will be used as a new value
for the node, instead
of the node's original value.

Processing configuration values
Processing Configuration Values
-------------------------------

The :class:`Symfony\\Component\\Config\\Definition\\Processor` uses the tree
Expand Down
8 changes: 4 additions & 4 deletions components/config/resources.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. index::
single: Config; Loading resources

Loading resources
Loading Resources
=================

Locating resources
Locating Resources
------------------

Loading the configuration normally starts with a search for resources – in
Expand All @@ -24,7 +24,7 @@ look in this directory first. The third argument indicates whether or not the
locator should return the first file it has found, or an array containing
all matches.

Resource loaders
Resource Loaders
----------------

For each type of resource (YAML, XML, annotation, etc.) a loader must be defined.
Expand Down Expand Up @@ -57,7 +57,7 @@ class, which allows for recursively importing other resources::
}
}

Finding the right loader
Finding the right Loader
------------------------

The :class:`Symfony\\Component\\Config\\Loader\\LoaderResolver` receives as
Expand Down
4 changes: 2 additions & 2 deletions components/console/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dispatched. Listeners receive a
$application = $command->getApplication();
});

The ``ConsoleEvents::TERMINATE`` event
The ``ConsoleEvents::TERMINATE`` Event
--------------------------------------

**Typical Purposes**: To perform some cleanup actions after the command has
Expand Down Expand Up @@ -89,7 +89,7 @@ Listeners receive a
It is then dispatched just before the ``ConsoleEvents::EXCEPTION`` event.
The exit code received in this case is the exception code.

The ``ConsoleEvents::EXCEPTION`` event
The ``ConsoleEvents::EXCEPTION`` Event
--------------------------------------

**Typical Purposes**: Handle exceptions thrown during the execution of a
Expand Down
6 changes: 3 additions & 3 deletions components/console/helpers/dialoghelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ All the methods inside the Dialog Helper have an
argument, the question as the second argument and the default value as the last
argument.

Asking the User for confirmation
Asking the User for Confirmation
--------------------------------

Suppose you want to confirm an action before actually executing it. Add
Expand Down Expand Up @@ -172,7 +172,7 @@ You can also ask and validate a hidden response::
If you want to allow the response to be visible if it cannot be hidden for
some reason, pass true as the fifth argument.

Let the user choose from a list of Answers
Let the User Choose from a List of Answers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.2
Expand Down Expand Up @@ -244,7 +244,7 @@ this set the seventh argument to ``true``::
Now, when the user enters ``1,2``, the result will be:
``You have just selected: blue, yellow``.

Testing a Command which expects input
Testing a Command which Expects Input
-------------------------------------

If you want to write a unit test for a command which expects some kind of input
Expand Down
2 changes: 1 addition & 1 deletion components/console/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ method::
You can also test a whole console application by using
:class:`Symfony\\Component\\Console\\Tester\\ApplicationTester`.

Calling an existing Command
Calling an Existing Command
---------------------------

If a command depends on another one being run before it, instead of asking the
Expand Down
2 changes: 1 addition & 1 deletion components/console/single_command_tool.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. index::
single: Console; Single command application

Building a Single Command Application
Building a single Command Application
=====================================

When building a command line tool, you may not need to provide several commands.
Expand Down
8 changes: 4 additions & 4 deletions components/css_selector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ You can install the component in 2 different ways:
Usage
-----

Why use CSS selectors?
~~~~~~~~~~~~~~~~~~~~~~
Why to Use CSS selectors?
~~~~~~~~~~~~~~~~~~~~~~~~~

When you're parsing an HTML or an XML document, by far the most powerful
method is XPath.
Expand All @@ -41,7 +41,7 @@ be converted to an XPath equivalent. This XPath expression can then be used
with other functions and classes that use XPath to find elements in a
document.

The CssSelector component
The CssSelector Component
~~~~~~~~~~~~~~~~~~~~~~~~~

The component's only goal is to convert CSS selectors to their XPath
Expand All @@ -66,7 +66,7 @@ You can use this expression with, for instance, :phpclass:`DOMXPath` or
uses the CssSelector component to find elements based on a CSS selector
string. See the :doc:`/components/dom_crawler` for more details.

Limitations of the CssSelector component
Limitations of the CssSelector Component
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Not all CSS selectors can be converted to XPath equivalents.
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ service by asking for the ``bar`` service like this::
bar: "@foo"
Requiring files
Requiring Files
---------------

There might be use cases when you need to include another file just before
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/compilation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ but also load a secondary one only if a certain parameter is set::

.. _components-dependency-injection-compiler-passes:

Prepending Configuration passed to the Extension
Prepending Configuration Passed to the Extension
------------------------------------------------

.. versionadded:: 2.2
Expand Down
4 changes: 2 additions & 2 deletions components/dependency_injection/definitions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ it to the container using::

$container->setDefinition($id, $definition);

Working with a definition
Working with a Definition
-------------------------

Creating a new definition
Creating a new Definition
~~~~~~~~~~~~~~~~~~~~~~~~~

If you need to create a new definition rather than manipulate one retrieved
Expand Down
4 changes: 2 additions & 2 deletions components/dependency_injection/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ like this::

$newsletterManager = $container->get('newsletter_manager');

Avoiding Your Code Becoming Dependent on the Container
Avoiding your Code Becoming Dependent on the Container
------------------------------------------------------

Whilst you can retrieve services from the container directly it is best
Expand All @@ -175,7 +175,7 @@ should be as few times as possible at the entry point to your application.

.. _components-dependency-injection-loading-config:

Setting Up the Container with Configuration Files
Setting up the Container with Configuration Files
-------------------------------------------------

As well as setting up the services using PHP as above you can also use
Expand Down
10 changes: 5 additions & 5 deletions components/dependency_injection/lazy_services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Lazy Services
.. versionadded:: 2.3
Lazy services were added in Symfony 2.3.

Why Lazy Services?
Why lazy Services?
------------------

In some cases, you may want to inject a service that is a bit heavy to instantiate,
Expand Down Expand Up @@ -36,13 +36,13 @@ the `ProxyManager bridge`_:

If you're using the full-stack framework, the proxy manager bridge is already
included but the actual proxy manager needs to be included. Therefore add

.. code-block:: json
"require": {
"ocramius/proxy-manager": "0.4.*"
}
to your ``composer.json``. Afterwards compile your container and check
to make sure that you get a proxy for your lazy services.

Expand Down Expand Up @@ -79,13 +79,13 @@ the same signature of the class representing the service. You can also inject
the service just like normal into other services. The object that's actually
injected will be the proxy.

To check if your proxy works you can simply check the interface of the
To check if your proxy works you can simply check the interface of the
received object.

.. code-block:: php
var_dump(class_implements($service));
If the class implements the ``ProxyManager\Proxy\LazyLoadingInterface`` your
lazy loaded services are working.

Expand Down
4 changes: 2 additions & 2 deletions components/dependency_injection/parentservices.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. index::
single: DependencyInjection; Parent services

Managing Common Dependencies with Parent Services
Managing common Dependencies with parent Services
=================================================

As you add more functionality to your application, you may well start to have
Expand Down Expand Up @@ -299,7 +299,7 @@ would cause an exception to be raised for a non-abstract service.
You can just extract common parts of similar service definitions into
a parent service without also extending a parent class in PHP.

Overriding Parent Dependencies
Overriding parent Dependencies
------------------------------

There may be times where you want to override what class is passed in for
Expand Down
4 changes: 2 additions & 2 deletions components/dependency_injection/tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Then, define the chain as a service:
$container->setDefinition('acme_mailer.transport_chain', new Definition('%acme_mailer.transport_chain.class%'));
Define Services with a Custom Tag
Define Services with a custom Tag
---------------------------------

Now you might want several of the ``\Swift_Transport`` classes to be instantiated
Expand Down Expand Up @@ -172,7 +172,7 @@ run when the container is compiled::
stack framework. See :doc:`/cookbook/service_container/compiler_passes`
for more details.

Adding additional attributes on Tags
Adding additional Attributes on Tags
------------------------------------

Sometimes you need additional information about each service that's tagged with your tag.
Expand Down
Loading

0 comments on commit 09d6ca1

Please sign in to comment.