nigelhough/php-time-source
Composer 安装命令:
composer require nigelhough/php-time-source
包简介
A source of time in PHP
README 文档
README
A library to abstract the source of time data within a PHP application.
An interface is provided that can be used in classes that depend on time.
Use Cases
A time source makes classes more testable by having a predictable and mockable time source.
In applications that use the time source consistently you can also do powerful things with mocking dates by setting a fixed date for integration or behavioural tests or even to run a dynamic version of your application to provide a consistent demo.
Implementation
This library comes with two implementations
- System time, where the time source is the PHP system time.
- Fixed, where the class can be instantiated with a fixed time that will always be returned.
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-06-04