PHP Classes
Icontem

File: DATA/InvalidInt.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Martin Alterisio  >  DATA  >  DATA/InvalidInt.php  
File: DATA/InvalidInt.php
Role: Class source
Content type: text/plain
Description: An exception thrown when a sql int field is filled with an invalid value or has overflown its capacity.
Class: DATA
Access data stored in MySQL tables like arrays
 

Contents

Class file image Download
<?php
/**
 * @package DATA
 */

/**
 * An exception thrown when a sql int field is filled with an
 * invalid value or has overflown its capacity.
 */
class DATA_InvalidInt extends DATA_SQLTypeConstraintFailed {
    
/**
     * The value that failed the constraint.
     * @var mixed
     */
    
private $providedValue;
    
    
/**
     * Constructor.
     * 
     * @param mixed $providedValue The value that failed the constraint.
     */
    
public function __construct($providedValue) {
        
parent::__construct("SQL int field cannot hold '$providedValue'");
        
$this->providedValue $providedValue;
    }
    
    
/**
     * Returns the value that failed the constraint.
     * 
     * @return mixed The value that failed the constraint.
     */
    
public function getProvidedValue() {
        return 
$this->providedValue;
    }
}
?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products