https://github.com/webman-tech/dto
[READ ONLY] Subtree split from webman-tech/components-monorepo
https://github.com/webman-tech/dto
Last synced: 10 months ago
JSON representation
[READ ONLY] Subtree split from webman-tech/components-monorepo
- Host: GitHub
- URL: https://github.com/webman-tech/dto
- Owner: webman-tech
- Created: 2025-07-09T10:25:41.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-29T03:31:23.000Z (10 months ago)
- Last Synced: 2025-07-29T05:41:32.883Z (10 months ago)
- Language: PHP
- Size: 53.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# webman-tech/dto
本项目是从 [webman-tech/components-monorepo](https://github.com/orgs/webman-tech/components-monorepo) 自动 split
出来的,请勿直接修改
> 简介
各种常用的 DTO
- BaseDTO: 基础 DTO
- 支持 `fromData` 从数组创建对象,并自动根据类型和 [ValidationRules](./src/Attributes/ValidationRules.php) 进行验证
- 支持 `toArray`,自动将 public 属性转出为数组
- BaseRequestDTO: 基础请求的 DTO
- 支持 `fromRequest` 从各种框架的 Request 来创建对象
- BaseResponseDTO: 基础响应的 DTO
- 支持 `toResponse`