PHP Classes

File: DATA/InvalidDate.php

Recommend this page to a friend!
  Classes of Martin Alterisio   DATA   DATA/InvalidDate.php   Download  
File: DATA/InvalidDate.php
Role: Class source
Content type: text/plain
Description: An exception thrown when a sql date field is filled with an invalid value.
Class: DATA
Access data stored in MySQL tables like arrays
Author: By
Last change: + anonymous access
Date: 17 years ago
Size: 701 bytes
 

Contents

Class file image Download
<?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;
    }
}
?>