Hydrator 1.0.0
2024-01-29
667次浏览
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.
新闻归档
热门标签
- yii3
- 扩展
- 发布
- yii2
- debug
- auth client
- view
- bootstrap
- release
- html
- redis
- apidoc
- Yii 2.0
- Yii 1.1
- mongodb
- mailer
- extensions
- twig
- gii
- queue
- runner
- http 客户端
- console
- validation
- cache
- sphinx
- widget
- hydrator
- translator
- symfonymailer
- db
- http
- log
- error handler
- config
- swiftmailer
- 图书
- imagine
- assets
- i18n
- IDE
- swagger
- elasticsearch
- router
- csrf
- smarty
- definitions
- logging
- fastroute
- user