diff --git a/components/config/caching.rst b/components/config/caching.rst index e014abdff87..4bb43558c64 100644 --- a/components/config/caching.rst +++ b/components/config/caching.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 diff --git a/components/config/definition.rst b/components/config/definition.rst index f84e76351ce..93de5a22bf7 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -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:: ->end() ; -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: ``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 @@ -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 @@ -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 diff --git a/components/config/resources.rst b/components/config/resources.rst index 15b357c3ee2..bcc47aa02e1 100644 --- a/components/config/resources.rst +++ b/components/config/resources.rst @@ -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 diff --git a/components/console/events.rst b/components/console/events.rst index f1dd133d505..c15d4d68a8c 100644 --- a/components/console/events.rst +++ b/components/console/events.rst @@ -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 diff --git a/components/console/helpers/dialoghelper.rst b/components/console/helpers/dialoghelper.rst index 6917d807235..da3cdb966c3 100644 --- a/components/console/helpers/dialoghelper.rst +++ b/components/console/helpers/dialoghelper.rst @@ -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 @@ -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 diff --git a/components/console/introduction.rst b/components/console/introduction.rst index cffbfabaddf..5e7e88a0d75 100644 --- a/components/console/introduction.rst +++ b/components/console/introduction.rst @@ -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 diff --git a/components/console/single_command_tool.rst b/components/console/single_command_tool.rst index 8f2dac46f2c..5082575def6 100644 --- a/components/console/single_command_tool.rst +++ b/components/console/single_command_tool.rst @@ -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. diff --git a/components/css_selector.rst b/components/css_selector.rst index 4a332a73c0d..412aed84e97 100644 --- a/components/css_selector.rst +++ b/components/css_selector.rst @@ -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. @@ -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 @@ -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. diff --git a/components/dependency_injection/advanced.rst b/components/dependency_injection/advanced.rst index db5fa9a04b2..77056c296ce 100644 --- a/components/dependency_injection/advanced.rst +++ b/components/dependency_injection/advanced.rst @@ -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 diff --git a/components/dependency_injection/compilation.rst b/components/dependency_injection/compilation.rst index a90110e4e65..611e40547ba 100644 --- a/components/dependency_injection/compilation.rst +++ b/components/dependency_injection/compilation.rst @@ -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 diff --git a/components/dependency_injection/definitions.rst b/components/dependency_injection/definitions.rst index 04c96bba872..46ed34ab36a 100644 --- a/components/dependency_injection/definitions.rst +++ b/components/dependency_injection/definitions.rst @@ -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 diff --git a/components/dependency_injection/introduction.rst b/components/dependency_injection/introduction.rst index a07d0aef948..0d1448a1cfa 100644 --- a/components/dependency_injection/introduction.rst +++ b/components/dependency_injection/introduction.rst @@ -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 diff --git a/components/dependency_injection/lazy_services.rst b/components/dependency_injection/lazy_services.rst index 8f93fbcae75..342a4b35c9a 100644 --- a/components/dependency_injection/lazy_services.rst +++ b/components/dependency_injection/lazy_services.rst @@ -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 var_dump(class_implements($service)); - + If the class implements the ``ProxyManager\Proxy\LazyLoadingInterface`` your lazy loaded services are working. diff --git a/components/dependency_injection/parentservices.rst b/components/dependency_injection/parentservices.rst index 36b0c1aa434..8b3cf6fb7e3 100644 --- a/components/dependency_injection/parentservices.rst +++ b/components/dependency_injection/parentservices.rst @@ -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 diff --git a/components/dependency_injection/tags.rst b/components/dependency_injection/tags.rst index b96cce13287..67a4a730cce 100644 --- a/components/dependency_injection/tags.rst +++ b/components/dependency_injection/tags.rst @@ -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. diff --git a/components/dependency_injection/workflow.rst b/components/dependency_injection/workflow.rst index f869587d49d..2373ec5f4dc 100644 --- a/components/dependency_injection/workflow.rst +++ b/components/dependency_injection/workflow.rst @@ -18,8 +18,8 @@ also handles the compilation and caching. Even if you are not using HttpKernel, it should give you an idea of one way of organizing configuration in a modular application. -Working with cached Container ------------------------------ +Working with a Cached Container +------------------------------- Before building it, the kernel checks to see if a cached version of the container exists. The HttpKernel has a debug setting and if this is false, the @@ -58,7 +58,7 @@ passed to the Extension which also usually loads its own config file(s), typical with a :doc:`Configuration object ` also stored in the bundle's ``DependencyInjection`` directory. -Compiler passes to allow Interaction between Bundles +Compiler Passes to Allow Interaction between Bundles ---------------------------------------------------- :ref:`Compiler passes ` are diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index 0ea96b89abc..d030b00cbde 100644 --- a/components/event_dispatcher/introduction.rst +++ b/components/event_dispatcher/introduction.rst @@ -243,7 +243,7 @@ Notice that this class doesn't actually *do* anything. The purpose of the events can be centralized. Notice also that a special ``FilterOrderEvent`` class will be passed to each listener of this event. -Creating an Event object +Creating an Event Object ........................ Later, when you dispatch this new event, you'll create an ``Event`` instance diff --git a/components/finder.rst b/components/finder.rst index 59e373d3768..c17f661dca8 100644 --- a/components/finder.rst +++ b/components/finder.rst @@ -295,7 +295,7 @@ it is called with the file as a :class:`Symfony\\Component\\Finder\\SplFileInfo` instance. The file is excluded from the result set if the Closure returns ``false``. -Reading contents of returned files +Reading Contents of Returned Files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The contents of returned files can be read with diff --git a/components/form/introduction.rst b/components/form/introduction.rst index 4b99dda69fa..f65556defc9 100644 --- a/components/form/introduction.rst +++ b/components/form/introduction.rst @@ -364,7 +364,7 @@ it throughout your application. .. _component-form-intro-create-simple-form: -Creating a Simple Form +Creating a simple Form ---------------------- .. tip:: @@ -425,7 +425,7 @@ comes with a lot of :doc:`built-in types `. Now that you've built your form, learn how to :ref:`render ` it and :ref:`process the form submission `. -Setting Default Values +Setting default Values ~~~~~~~~~~~~~~~~~~~~~~ If you need your form to load with some default values (or you're building diff --git a/components/form/type_guesser.rst b/components/form/type_guesser.rst index 652f350b1ac..015bb8aeb1b 100644 --- a/components/form/type_guesser.rst +++ b/components/form/type_guesser.rst @@ -1,7 +1,7 @@ .. index:: single: Forms; Custom Type Guesser -Creating a Custom Type Guesser +Creating a custom Type Guesser ============================== The Form component can guess the type and some options of a form field by diff --git a/components/http_foundation/session_configuration.rst b/components/http_foundation/session_configuration.rst index ba8dfa80fd8..ca1332cfaa1 100644 --- a/components/http_foundation/session_configuration.rst +++ b/components/http_foundation/session_configuration.rst @@ -188,7 +188,7 @@ experience, for example, by displaying a message. Symfony2 records some basic metadata about each session to give you complete freedom in this area. -Session metadata +Session Metadata ~~~~~~~~~~~~~~~~ Sessions are decorated with some basic metadata to enable fine control over the @@ -217,7 +217,7 @@ particular cookie by reading the ``getLifetime()`` method:: The expiry time of the cookie can be determined by adding the created timestamp and the lifetime. -PHP 5.4 compatibility +PHP 5.4 Compatibility ~~~~~~~~~~~~~~~~~~~~~ Since PHP 5.4.0, :phpclass:`SessionHandler` and :phpclass:`SessionHandlerInterface` diff --git a/components/http_foundation/sessions.rst b/components/http_foundation/sessions.rst index dd5ddfdba54..df9938a4ebe 100644 --- a/components/http_foundation/sessions.rst +++ b/components/http_foundation/sessions.rst @@ -225,7 +225,7 @@ has a simple API * :method:`Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface::clear`: Clear the bag; -Flash messages +Flash Messages ~~~~~~~~~~~~~~ The purpose of the :class:`Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface` diff --git a/components/http_foundation/trusting_proxies.rst b/components/http_foundation/trusting_proxies.rst index f514e97835d..5ce8f888c50 100644 --- a/components/http_foundation/trusting_proxies.rst +++ b/components/http_foundation/trusting_proxies.rst @@ -24,10 +24,10 @@ your proxy. // only trust proxy headers coming from this IP addresses Request::setTrustedProxies(array('192.0.0.1', '10.0.0.0/8')); - + .. note:: - When using Symfony's internal reverse proxy (``AppCache.php``) make sure to add + When using Symfony's internal reverse proxy (``AppCache.php``) make sure to add ``127.0.0.1`` to the list of trusted proxies. @@ -49,7 +49,7 @@ can configure that header name via :method:`Symfony\\Component\\HttpFoundation\\ Request::setTrustedHeaderName(Request::HEADER_CLIENT_PORT, 'X-Proxy-Port'); Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, 'X-Proxy-Proto'); -Not trusting certain Headers +Not Trusting certain Headers ---------------------------- By default, if you whitelist your proxy's IP address, then all four headers diff --git a/components/http_kernel/introduction.rst b/components/http_kernel/introduction.rst index 7e40b393078..b1528695ccd 100644 --- a/components/http_kernel/introduction.rst +++ b/components/http_kernel/introduction.rst @@ -123,7 +123,7 @@ For general information on adding listeners to the events below, see .. _component-http-kernel-kernel-request: -1) The ``kernel.request`` event +1) The ``kernel.request`` Event ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **Typical Purposes**: To add more information to the ``Request``, initialize @@ -261,7 +261,7 @@ will be called after another event - ``kernel.controller`` - is dispatched. .. _component-http-kernel-kernel-controller: -3) The ``kernel.controller`` event +3) The ``kernel.controller`` Event ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **Typical Purposes**: Initialize things or change the controller just before @@ -367,7 +367,7 @@ has a little bit more work to do - :ref:`kernel.view