PHP Class Symfony\Component\Form\ValueTransformer\DateTimeToStringTransformer

Author: Bernhard Schussek ([email protected])
Author: Florian Eckerstorfer ([email protected])
Inheritance: extends Symfony\Component\Form\Configurable, implements Symfony\Component\Form\ValueTransformer\ValueTransformerInterface
Datei anzeigen Open project: pmjones/php-framework-benchmarks Class Usage Examples

Public Methods

Method Description
reverseTransform ( string $value, $originalValue ) : DateTime Transforms a date string in the configured timezone into a DateTime object
transform ( DateTime $value ) : string Transforms a DateTime object into a date string with the configured format and timezone

Protected Methods

Method Description
configure ( ) {@inheritDoc}

Method Details

configure() protected method

{@inheritDoc}
protected configure ( )

reverseTransform() public method

Transforms a date string in the configured timezone into a DateTime object
public reverseTransform ( string $value, $originalValue ) : DateTime
$value string A value as produced by PHP's date() function
return DateTime A DateTime object

transform() public method

Transforms a DateTime object into a date string with the configured format and timezone
public transform ( DateTime $value ) : string
$value DateTime A DateTime object
return string A value as produced by PHP's date() function