rkr/array-object-converter 问题修复 & 功能扩展

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

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

rkr/array-object-converter

最新稳定版本:1.0.5.2

Composer 安装命令:

composer require rkr/array-object-converter

包简介

A module to copy data from an array to an object, vice versa.

README 文档

README

A module to copy data from an array into an object, vice versa. Requires PHP 5.4+.

You have to provide information for targeted objects to describe how properties are connected to array keys. This is done through "SpecificationProvider"s.

Right now there is just one provider ready: The PhpDocSpecificationProvider extracts the annotations from the object's methods. Other providers may follow, if I find some time for that.

If all objects are equipped with propper annotations, you can do this:

$array = (new ArrayObjectConverter($entity))->getArray();

Or the other way around:

$object = (new ArrayObjectConverter($entity))->setArray($array);

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-12-19