<?php
/**
* @package DATA
*/
/**
* An exception thrown when a sql datetime field is filled with an
* invalid value.
*/
class DATA_InvalidDatetime extends DATA_SQLTypeConstraintFailed {
/**
* The invalid datetime.
* @var string
*/
private $datetime;
/**
* Constructor.
*
* @param string $datetime The invalid datetime.
*/
public function __construct($datetime) {
parent::__construct("'$datetime' is an invalid datetime.");
$this->datetime = $datetime;
}
/**
* Returns the invalid datetime.
*
* @return string The invalid datetime.
*/
public function getDatetime() {
return $this->datetime;
}
}
?>
|