interface ClockInterface (View source)

Provides current time through an injectable boundary without exposing its time source.

Methods

now()

Returns an immutable timestamp representing the clock's current instant.

Details

now

Returns an immutable timestamp representing the clock's current instant.

Return Value

DateTimeImmutable