我的config.yml
中有一些设置,我希望将其作为参数传递给services.yml
中的服务。
#config.yml
hwi_oauth:
resource_owners:
facebook:
type: facebook
client_id: %facebook_app_id%
client_secret: %facebook_app_secret%
scope: "email, public_profile, user_friends"
infos_url: "https://graph.facebook.com/me?fields=id,name,email,picture.type(square)"
paths:
email: email
profilepicture: picture.data.url
options:
display: popup #dialog is optimized for popup window
#services.yml
hwi_oauth.resource_owner.facebook:
class: AppBundle\OAuth\ResourceOwner\FacebookResourceOwner
arguments: ['@hwi_oauth.http_client','@security.http_utils',**{INJECT HERE}**,'@hwi_oauth.storage.session']
我该怎么做?
答案 0 :(得分:1)
将这些值作为参数。您可以将参数注入服务中。