Last active
August 29, 2015 14:07
-
-
Save digitalkaoz/90644937a322b3739bd2 to your computer and use it in GitHub Desktop.
serializer for external classes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/config/config.yml | |
jms_serializer: | |
metadata: | |
directories: | |
my-file: | |
namespace_prefix: "My\\Ns" | |
path: "@MyNsBundle/Resources/config/serializer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// My/Ns/File | |
namespace My\Ns; | |
class File | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- My/Ns/Bundle/Resources/config/serializer/My.Ns.File.xml --> | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<serializer> | |
<class name="My\Ns\File" exclusion-policy="ALL"> | |
</class> | |
</serializer> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
got it working: