承接 am2tec/hydrator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

am2tec/hydrator

最新稳定版本:1.0

Composer 安装命令:

composer require am2tec/hydrator

包简介

Hydrate your object with class setters

README 文档

README

Build Status codecov

Hydrator

PHP Library to hydrate objects with class setters

Instalation

composer require am2tec/hydrator 

How use

If you have a class like this:

class Example { private $test; public function setTest($test) { $this->test = $test; } public function getTest() { return $this->test; } } 

And need to create a object from an array:

$myData = [ 'test' => 'this is a test' ]; 

You can use FerFabricio\Hydrate\Hydrate to do this work in a simple way:

use FerFabricio\Hydratate\Hydrate; class Example { private $test; public function setTest($test) { $this->test = $test; } public function getTest() { return $this->test; } } $myData = [ 'test' => 'this is a test' ]; $example = Hydratate::toObject(Example::class, $myData); echo $example->getTest(); // This line will print: this is a test 

Autoload

This library is only compatible with PSR-4, please be sure if your application is well configured to work with this.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固