jardispsr/classversion
最新稳定版本:1.0.0
Composer 安装命令:
composer require jardispsr/classversion
包简介
This package provides classversion interfaces for a domain driven design approach
README 文档
README
This package provides classversion interfaces for a domain driven design approach.
Installation
composer require jrs/class-version
Interfaces
ClassVersionInterface
The main interface for resolving versioned class instances.
interface ClassVersionInterface { /** * @template T * @param class-string<T> $className * @param ?string $version * @return mixed|T */ public function __invoke(string $className, ?string $version = null): mixed; }
ClassVersionConfigInterface
Interface for managing version configuration.
interface ClassVersionConfigInterface { /** * @param string|null $version * @return string|null */ public function version(?string $version = null): ?string; }
Usage
Implement these interfaces to create a versioning system for your domain classes, allowing you to manage different versions of class implementations in your DDD architecture.
License
MIT
统计信息
- 总下载量: 57
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-27