cohete/ddd
最新稳定版本:v0.1.0
Composer 安装命令:
composer require cohete/ddd
包简介
Opinionated DDD building blocks for Cohete
README 文档
README
Opinionated DDD building blocks for Cohete.
Installation
composer require cohete/ddd
Value Objects
- StringValueObject - Base class for string VOs with validation (maxLength, notNull, notEmpty)
- UuidValueObject - UUID v4 via ramsey/uuid
- AtomDateValueObject - Dates in ATOM format
Example: custom Value Object
use Cohete\DDD\ValueObject\StringValueObject; class UserEmail extends StringValueObject { public static function from(?string $value = null): static { static::assertNotNull($value); static::assertNotEmpty($value); static::assertMaxLength(255, $value); if (!filter_var($value, FILTER_VALIDATE_EMAIL)) { throw new \InvalidArgumentException("Invalid email: $value"); } return parent::from($value); } }
License
MIT
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-18