@@ -727,19 +727,17 @@ Locating Resources
727
727
------------------
728
728
729
729
The HttpKernel component is responsible of the bundle mechanism used in Symfony
730
- applications. The key feature of the bundles is that they allow to override any
731
- resource used by the application (config files, templates, controllers,
732
- translation files, etc.)
733
-
734
- This overriding mechanism works because resources are referenced not by their
735
- physical path but by their logical path. For example, the ``services.xml `` file
736
- stored in the ``Resources/config/ `` directory of a bundle called FooBundle is
737
- referenced as ``@FooBundle/Resources/config/services.xml ``. This logical path
738
- will work when the application overrides that file and even if you change the
739
- directory of FooBundle.
740
-
741
- The HttpKernel component provides a method called :method: `Symfony\\ Component\\ HttpKernel\\ Kernel::locateResource `
742
- which can be used to transform logical paths into physical paths::
730
+ applications. One of the key features of the bundles is that you can use logic
731
+ paths instead of physical paths to refer to any of their resources (config files,
732
+ templates, controllers, translation files, etc.)
733
+
734
+ This allows to import resources even if you don't know where in the filesystem a
735
+ bundle will be installed. For example, the ``services.xml `` file stored in the
736
+ ``Resources/config/ `` directory of a bundle called FooBundle can be referenced as
737
+ ``@FooBundle/Resources/config/services.xml `` instead of ``__DIR__/Resources/config/services.xml ``.
738
+
739
+ This is possible thanks to the :method: `Symfony\\ Component\\ HttpKernel\\ Kernel::locateResource `
740
+ method provided by the kernel, which transforms logical paths into physical paths::
743
741
744
742
$path = $kernel->locateResource('@FooBundle/Resources/config/services.xml');
745
743
0 commit comments