for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace JhFlexiTime\DBAL\Types;
use Doctrine\DBAL\Types\DateType as DoctrineDateType;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use JhFlexiTime\DateTime\DateTime;
/**
* Class DateType
* @package JhFlexiTime\DBAL\Types
* @author Aydin Hassan <[email protected]>
*/
class DateType extends DoctrineDateType
{
* @param mixed $value
* @param AbstractPlatform $platform
* @return DateTime|mixed
public function convertToPHPValue($value, AbstractPlatform $platform)
$dateTime = parent::convertToPHPValue($value, $platform);
$return = new DateTime();
$return->setTimestamp($dateTime->getTimestamp());
return $return;
}
* @return string
public function getName()
return 'date';