我有这个yml代码
my.oauth_aware.user_provider.service:
class: HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider
arguments: [@fos_user.user_manager,{facebook: facebook_id, google: google_id}]
但是我必须将其转换为 XML,所以我制作了这段代码。
我有一个问题。
<service id="my.oauth_aware.user_provider.service" class="HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider">
<argument type="service" id="fos_user.user_manager">
{facebook: facebook_id, google: google_id} #How do I write array in XML?
</service>
如何在 XML 中编写数组?
最佳答案
你的第二个参数是这样的:
<argument type="collection">
<argument key="facebook">facebook_id</argument>
<argument key="google">google_id</argument>
</argument>
关于xml - 如何在 XML 中编写数组? YML-XML 翻译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20631348/