Skip to content

Commit 0153cb0

Browse files
committed
Address review feedback: remove XML block and document wildcard attributes
1 parent 799d6c0 commit 0153cb0

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

reference/events.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ controller:
8181
// get all attributes, grouped by class name
8282
$allAttributes = $event->getAttributes();
8383
84+
// get all attributes as a flat list (not grouped)
85+
$flatAttributes = $event->getAttributes('*');
86+
8487
// get attributes of a specific class
8588
$cacheAttributes = $event->getAttributes(Cache::class);
8689
}
@@ -201,6 +204,9 @@ on the controller that handled the request:
201204
// get all controller attributes, grouped by class name
202205
$allAttributes = $event->getControllerAttributes();
203206
207+
// get all controller attributes as a flat list (not grouped)
208+
$flatAttributes = $event->getControllerAttributes('*');
209+
204210
// get attributes of a specific class
205211
$cacheAttributes = $event->getControllerAttributes(Cache::class);
206212
}

service_container.rst

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -271,19 +271,6 @@ You can limit service registration to specific environments as follows:
271271
services:
272272
App\Service\AnotherClass: ~
273273
274-
.. code-block:: xml
275-
276-
<!-- config/services.xml -->
277-
<services>
278-
<service id="App\Service\SomeClass"/>
279-
280-
<when env="dev">
281-
<services>
282-
<service id="App\Service\AnotherClass"/>
283-
</services>
284-
</when>
285-
</services>
286-
287274
.. code-block:: php
288275
289276
// config/services.php

0 commit comments

Comments
 (0)