public function convertToPHPValue($value)
{
if ($value === null) {
return null;
}
$val = \DateTime::createFromFormat('!' . static::FORMAT, $value);
if (!$val) {
throw ConversionException::conversionFailed($value, $this->getName());
}
return $val;
}
public function testNullConversion() { $this->assertNull($this->_type->convertToPHPValue(null)); }