ClockServiceProvider
Service provider for registering Symfony Clock services in the Fast Forward Container.
Description
This class SHALL expose factories and extensions for clock-related services, including PSR-20 and Symfony Clock implementations, using the Fast Forward Container conventions.
Interfaces
Methods
Returns the service extensions exposed by this package.
Returns the service factories exposed by this package.
Returns the service extensions exposed by this package.
public
getExtensions() : array<string, callable>
Description
The returned array SHALL map service names (class strings) to callables that extend or decorate existing services. This implementation returns an empty array, as no extensions are provided by default.
Return values
Description
associative array of service extensions (empty by default)
Returns the service factories exposed by this package.
public
getFactories() : array<string, callable>
Description
The returned array SHALL map service names (class strings) to callables or factory objects that create the corresponding service instances. This includes:
- DateTimeZone::class: Provides a DateTimeZone instance using DateTimeZoneFactory.
- ClockInterface::class and SymfonyClockInterface::class: Aliases to NativeClock.
- NativeClock, MockClock, MonotonicClock: Instantiated via InvokableFactory with appropriate arguments.
Return values
Description
associative array of service factories