Doctrine\OXM\Types\DateType::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 testDateConvertsToDatabaseValue()
 {
     $this->assertTrue(is_string($this->_type->convertToXmlValue(new \DateTime())));
 }