/** * {@inheritdoc} */ public function convertToDatabaseValue($value, AbstractPlatform $platform) { if (!$value) { return ''; } if (!$value instanceof TimeSpent) { throw new \RuntimeException('Value should be a Time Spent type.'); } return parent::convertToDatabaseValue($value->getValue(), $platform); }
public function convertToDatabaseValue($value, AbstractPlatform $platform) { if (!$value) { return ''; } if (false === $value instanceof TicketSequenceNumber) { throw new \RuntimeException("Value should be a Ticket Sequence Number type."); } return parent::convertToDatabaseValue($value->getValue(), $platform); }
/** * {@inheritdoc} */ public function convertToDatabaseValue($value, AbstractPlatform $platform) { return parent::convertToDatabaseValue($value === null ? null : $value, $platform); }