dimitrilahaye / dodo-entity-serializer
Dodo is back and he's very angry (and hungry.. huh)! With him, you can now convert some entity-like objects into json and some json into entity-like object! And he automatically manages objects array and array-like json. So cute :)
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=5.4
Requires (Dev)
- phpunit/php-code-coverage: 3.*
- phpunit/phpunit: 5.*
This package is not auto-updated.
Last update: 2025-02-01 21:19:52 UTC
README
# Dodo Entity Serializer Library
Dodo is back and he's very angry (and hungry.. huh)! With him, you can now convert some entity-like objects into json and some json into entity-like object! And he automatically manages objects array and array-like json. So cute :)
Table of Contents
EntitySerializer
General class for DodoEntitySerializer. Provides all the methods to :
- Convert Entity Object or Array of Entities Objects to JSON
- Convert JSON to Entity Object or array of Entities Objects JSON
- Full name: \DodoPhpLab\DodoEntitySerializer\Classes\EntitySerializer
getInstance
EntitySerializer::getInstance( )
- This method is static.
jsonToObject
Returns an object from a json and the class's namespace of the object we want to return.
EntitySerializer::jsonToObject( string $classNamespace, string $json ): mixed[]
Parameters:
Return Value:
array of Entity-type objects or one Entity-type object.
objectToJson
Returns a string formatted json from an object and his class's namespace.
EntitySerializer::objectToJson( string $classNamespace, mixed[] $object ): string
Parameters:
Return Value:
the string formatted json representation of the $object passed in argument.
Coming Soon
Handle add... methods (there : addSubscriber with User object in argument)
See how to manage null values
Manage exceptions
Write some things into README
This document was automatically generated from source code comments on 2016-05-25 using phpDocumentor and cvuorinen/phpdoc-markdown-public