Doctrine\OXM\Types\DateTimeType::convertToXmlValue PHP Method

convertToXmlValue() public method

public convertToXmlValue ( $value )
    public function convertToXmlValue($value)
    {
        return $value !== null ? $value->format(static::FORMAT) : null;
    }

Usage Example

Beispiel #1
0
 public function testDateTimeConvertsToXmlValue()
 {
     $date = new \DateTime('1985-09-01 10:10:10');
     $expected = DateTimeType::FORMAT;
     $actual = is_string($this->_type->convertToXmlValue($date));
     $this->assertEquals($expected, $actual);
 }
All Usage Examples Of Doctrine\OXM\Types\DateTimeType::convertToXmlValue