egeloen / serializer-bundle
支持JSON、XML、YAML & CSV的PHP 5.6+序列化器
1.0.0
2017-02-27 21:57 UTC
Requires
- php: ^5.6|^7.0
- egeloen/serializer: ^1.0
- symfony/cache: ^3.1
- symfony/framework-bundle: ^2.7|^3.0
Requires (Dev)
- doctrine/annotations: ^1.0
- friendsofphp/php-cs-fixer: ^2.0
- friendsofsymfony/rest-bundle: ^2.0
- phpunit/phpunit: ^5.4
- symfony/form: ^2.7|^3.0
- symfony/phpunit-bridge: ^2.7|^3.0
- symfony/translation: ^2.7|^3.0
This package is not auto-updated.
Last update: 2024-09-14 20:04:15 UTC
README
此包提供了Ivory Serializer库的集成,以便在您的Symfony2项目中使用。
use Ivory\Serializer\Format; $stdClass = new \stdClass(); $stdClass->foo = true; $stdClass->bar = ['foo', [123, 432.1]]; $serializer = $container->get('ivory.serializer'); echo $serializer->serialize($stdClass, Format::JSON); // {"foo": true,"bar": ["foo", [123, 432.1]]} $deserialize = $serializer->deserialize($json, \stdClass::class, Format::JSON); // $deserialize == $stdClass
文档
测试
该包已通过PHPUnit完全单元测试,代码覆盖率接近100%。要执行测试套件,请查看travis 配置。
贡献
我们欢迎贡献者!Ivory是一个开源项目。如果您想做出贡献,请随时提出PR!您可以查看CONTRIBUTING文件,该文件将解释如何设置项目。
许可证
Ivory Google Map Bundle遵循MIT许可证。有关完整的版权和许可证信息,请阅读与源代码一起分发的LICENSE文件。