Download the PHP package yiisoft/hydrator without Composer
On this page you can find all versions of the php package yiisoft/hydrator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yiisoft/hydrator
More information about yiisoft/hydrator
Files in yiisoft/hydrator
Package hydrator
Short Description Create and populate objects with type casting, mapping and dependencies resolving support.
License BSD-3-Clause
Homepage https://www.yiiframework.com/
Informations about the package hydrator
Yii Hydrator
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.
Requirements
- PHP 8.1 or higher.
Installation
The package could be installed with Composer:
General usage
To hydrate existing object:
To create a new object and fill it with the data:
To pass arguments to the constructor of a nested object, use nested array or dot-notation:
That would pass the name
constructor argument of the Car
object and create a new Engine
object for engine
argument passing V8
as the name
argument to its constructor.
Documentation
- Guide: Русский
- Internals
If you need help or have a question, the Yii Forum is a good place for that. You may also check out other Yii Community Resources.
License
The Yii Hydrator is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Maintained by Yii Software.
Support the project
Follow updates
All versions of hydrator with dependencies
psr/container Version ^2.0
yiisoft/injector Version ^1.1
yiisoft/strings Version ^2.3