PHP Classes

File: DATA/InvalidTime.php

Recommend this page to a friend!
  Classes of Martin Alterisio   DATA   DATA/InvalidTime.php   Download  
File: DATA/InvalidTime.php
Role: Class source
Content type: text/plain
Description: An exception thrown when a sql time 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 time field is filled with an
 * invalid value.
 */
class DATA_InvalidTime extends DATA_SQLTypeConstraintFailed {
   
/**
     * The invalid time.
     * @var string
     */
   
private $time;
   
   
/**
     * Constructor.
     *
     * @param string $time The invalid time.
     */
   
public function __construct($time) {
       
parent::__construct("'$time' is an invalid time.");
       
$this->time = $time;
    }
   
   
/**
     * Returns the invalid time.
     *
     * @return string The invalid time.
     */
   
public function getTime() {
        return
$this->time;
    }
}
?>