Browse files

minor #3829 [Components] consistent headlines (xabbuh)

This PR was merged into the 2.3 branch.


[Components] consistent headlines

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

This is a follow-up of #3765.


0586ec4 [Components] consistent headlines
  • Loading branch information...
weaverryan committed May 9, 2014
2 parents 54e0882 + 0586ec4 commit 09d6ca1ee588982b2f6d067744b09ec911e1538a
Showing with 86 additions and 86 deletions.
  1. +1 −1 components/config/caching.rst
  2. +15 −15 components/config/definition.rst
  3. +4 −4 components/config/resources.rst
  4. +2 −2 components/console/events.rst
  5. +3 −3 components/console/helpers/dialoghelper.rst
  6. +1 −1 components/console/introduction.rst
  7. +1 −1 components/console/single_command_tool.rst
  8. +4 −4 components/css_selector.rst
  9. +1 −1 components/dependency_injection/advanced.rst
  10. +1 −1 components/dependency_injection/compilation.rst
  11. +2 −2 components/dependency_injection/definitions.rst
  12. +2 −2 components/dependency_injection/introduction.rst
  13. +5 −5 components/dependency_injection/lazy_services.rst
  14. +2 −2 components/dependency_injection/parentservices.rst
  15. +2 −2 components/dependency_injection/tags.rst
  16. +3 −3 components/dependency_injection/workflow.rst
  17. +1 −1 components/event_dispatcher/introduction.rst
  18. +1 −1 components/finder.rst
  19. +2 −2 components/form/introduction.rst
  20. +1 −1 components/form/type_guesser.rst
  21. +2 −2 components/http_foundation/session_configuration.rst
  22. +1 −1 components/http_foundation/sessions.rst
  23. +3 −3 components/http_foundation/trusting_proxies.rst
  24. +7 −7 components/http_kernel/introduction.rst
  25. +3 −3 components/options_resolver.rst
  26. +1 −1 components/routing/hostname_pattern.rst
  27. +1 −1 components/routing/introduction.rst
  28. +3 −3 components/security/authentication.rst
  29. +2 −2 components/security/authorization.rst
  30. +3 −3 components/security/firewall.rst
  31. +1 −1 components/templating/introduction.rst
  32. +1 −1 components/using_components.rst
  33. +4 −4 components/yaml/introduction.rst
@@ -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
@@ -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
@@ -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
@@ -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.
@@ -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
@@ -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
@@ -133,7 +133,7 @@ allowing to validate the value::
Enum nodes
Enum Nodes
.. versionadded:: 2.1
@@ -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
@@ -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:
@@ -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
@@ -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:
@@ -330,7 +330,7 @@ For all nodes:
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
@@ -502,7 +502,7 @@ By changing a string value into an associative array with ``name`` as the key::
Validation rules
Validation Rules
More advanced validation rules can be provided using the
@@ -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
@@ -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
@@ -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.
@@ -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
@@ -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
@@ -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
@@ -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
Asking the User for confirmation
Asking the User for Confirmation
Suppose you want to confirm an action before actually executing it. Add
@@ -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
@@ -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
@@ -437,7 +437,7 @@ method::
You can also test a whole console application by using
Calling an existing Command
Calling an Existing Command
If a command depends on another one being run before it, instead of asking the
@@ -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.
@@ -18,8 +18,8 @@ You can install the component in 2 different ways:
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.
@@ -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
The CssSelector component
The CssSelector Component
The component's only goal is to convert CSS selectors to their XPath
@@ -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.
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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,
@@ -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.
@@ -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
If the class implements the ``ProxyManager\Proxy\LazyLoadingInterface`` your
lazy loaded services are working.
@@ -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
@@ -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
@@ -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
@@ -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.
Oops, something went wrong.

0 comments on commit 09d6ca1

Please sign in to comment.