DateTimeZoneFactory
Factory for creating DateTimeZone instances for the Fast Forward Container.
Description
This factory SHALL return a DateTimeZone instance based on configuration, or fallback to the default timezone.
Methods
Creates a DateTimeZone instance using configuration from the container.
Creates a DateTimeZone instance using configuration from the container.
public
__invoke(ContainerInterface
$container) : DateTimeZone
Description
If the container does not provide a ConfigInterface, or the configuration does not specify a timezone, this method SHALL return a DateTimeZone using the current default timezone.
If the configuration value for DateTimeZone::class is already a DateTimeZone instance, it SHALL be returned as-is. Otherwise, the value SHALL be used as the timezone identifier string.
Parameters
$container
:
ContainerInterface
Description
the container from which to retrieve configuration
Return values
Description
the resolved DateTimeZone instance