Registry / utility / psr-clock

psr-clock

JSON →
library1.0.0phppackagistunverified

Common interface for reading the clock.

composer require psr/clock
INSTALL
IMPORT
SIG · PSR-CLOCK
P
psr-clock
utilityphpv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ClockInterface
use Psr\Clock\ClockInterface;

Implement the ClockInterface to provide a custom clock.

use Psr\Clock\ClockInterface; class MyClock implements ClockInterface { public function now(): \DateTimeImmutable { return new \DateTimeImmutable(); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
psr-clock — pip install psr-clock · libregistry