3

I have this yml code

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}]

However I have to translate this into XML, so I made this code.

I have one question.

     <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>

How do I write an array in XML??

1
  • I think you mixed XML and YML in your question, please update it. Commented Dec 17, 2013 at 10:30

1 Answer 1

4

Your second argument would be something like:

<argument type="collection">
    <argument key="facebook">facebook_id</argument>
    <argument key="google">google_id</argument>
</argument>
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks,I should use 'key'!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.