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