Hydrator 1.0.0 您所在的位置:网站首页 yii框架官网 Hydrator 1.0.0

Hydrator 1.0.0

2024-07-12 04:29| 来源: 网络整理| 查看: 265

First stable release of yiisoft/hydrator was tagged.

The package provides a way to create and hydrate objects from a set of raw data. Features are:

supports properties of any visibility; uses constructor arguments to create objects; resolves dependencies when creating objects using PSR-11 compatible DI container provided; supports nested objects; supports mapping; allows fine-tuning hydration via PHP attributes.

To hydrate existing object:

use Yiisoft\Hydrator\Hydrator; $hydrator = new Hydrator(); $hydrator->hydrate($object, $data);

To create a new object and fill it with the data:

use Yiisoft\Hydrator\Hydrator; $hydrator = new Hydrator(); $object = $hydrator->create(MyClass::class, $data);

As usual, the package has 100% test coverage and 100% mutation score.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有