lokus/dto
最新稳定版本:1.0.1
Composer 安装命令:
composer require lokus/dto
包简介
Package for creating DTOs
README 文档
README
This package allows you to create DTO from array with providing validation of key names and parameteres of constructor, also validate types of array values.
Installation:
composer require lokus/dto
Example of usage:
use Lokus\Dto\SimpleDTO; final readonly class PostDTO extends SimpleDTO { public function __construct( public string $title, public string $content, ) {} } $data = [ 'title' => 'Simple Title', 'content' => 'Simple Content', ]; $dto = PostDTO::fromArray($data); echo $dto->title; echo $dto->content;
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-10