1

I have this in parameters.yml

parameters:
    various_info:
        setting_1:
            test: true

I want to pass in 'various_info.setting_1' into a service, but can only seem to get it working if I pass in the whole 'various_info' parameter.

In services.yml this would work

a.random.service:
    class: etc..
    arguments:
        - @another_service
        - %another_param%
        - %various_info%

...but I want to just pass in the part required, and neither of these will work

arguments:
    - %various_info.setting_1%
arguments:
    - [%various_info.setting_1%]

Is it possible? It would be clearner and a better practice to only pass the part required I think.

4

1 回答 1

0

这个有可能。security.yml 包含在 config.yml 的开头,其中还包含 parameters.yml。

于 2013-07-28T18:18:27.117 回答