Skip to content

Commit 9556746

Browse files
abdounikarimOskarStark
authored andcommitted
Update import.rst
1 parent 67e00d3 commit 9556746

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

service_container/import.rst

+6-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ a relative or absolute path to the imported file:
8080
# config/services.yaml
8181
imports:
8282
- { resource: services/mailer.yaml }
83-
83+
# If you want to import a whole directory:
84+
- { resource: services/ }
8485
services:
8586
_defaults:
8687
autowire: true
@@ -103,6 +104,8 @@ a relative or absolute path to the imported file:
103104
104105
<imports>
105106
<import resource="services/mailer.xml"/>
107+
<!-- If you want to import a whole directory: -->
108+
<import resource="services/"/>
106109
</imports>
107110
108111
<services>
@@ -122,6 +125,8 @@ a relative or absolute path to the imported file:
122125
123126
return function(ContainerConfigurator $configurator) {
124127
$configurator->import('services/mailer.php');
128+
// If you want to import a whole directory:
129+
$configurator->import('services/');
125130
126131
$services = $configurator->services()
127132
->defaults()

0 commit comments

Comments
 (0)