Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer::transform
Transforms a DateTime object into a timestamp in the configured timezone.
Signature
public function transform(DateTime
$value )
Parameters
$value
— object- A \DateTime object
Returns
- integer
- A timestamp
Errors/Exceptions
-
TransformationFailedException
- If the given value is not an instance