Copied!

A helper providing autocompletion for available DateTimeNormalizer options.

CloneableFinalInstantiable
Methods
public toArray() : array
 
  • return array<string,mixed>
public withCast(?string $cast) : static
 
  • param "int"|"float"|null $cast
public withContext(Symfony\Component\Serializer\Context\ContextBuilderInterface|array $context) : static
 
  • param \ContextBuilderInterface|array<string,mixed> $context
public withFormat(?string $format) : static
 

Configures the format of the date.

  • see https://secure.php.net/manual/en/datetime.format.php
public withTimezone(DateTimeZone|string|?null $timezone) : static
 

Configures the timezone of the date.

It could be either a \DateTimeZone or a string that will be used to construct the \DateTimeZone

  • see https://secure.php.net/manual/en/class.datetimezone.php
  • throws \InvalidArgumentException
Methods
protected with(string $key, ?mixed $value) : static
Properties
private array $context = []
 
  • var array<string,mixed>
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration