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