PHP Classes

File: DATA/InvalidDatetime.php

Recommend this page to a friend!
  Classes of Martin Alterisio   DATA   DATA/InvalidDatetime.php   Download  
File: DATA/InvalidDatetime.php
Role: Class source
Content type: text/plain
Description: An exception thrown when a sql datetime 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: 761 bytes
 

Contents

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