dimitrilahaye/dodo-entity-serializer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dimitrilahaye/dodo-entity-serializer

Composer 安装命令:

composer create-project 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 :)

README 文档

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:

Parameter Type Description
$classNamespace string the class name with namespace.
$json string the json to transform in object.

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:

Parameter Type Description
$classNamespace string the class name with namespace.
$object mixed[] the object to transform into json.

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

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2016-05-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固