PHP Classes
Icontem

File: DATA/RowDoesntExist.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/RowDoesntExist.php  
File: DATA/RowDoesntExist.php
Role: Class source
Content type: text/plain
Description: An exception thrown when trying to read a row that doesn't exist on the table.
Class: DATA
Access data stored in MySQL tables like arrays
 

Contents

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

/**
 * An exception thrown when trying to read a row that
 * doesn't exist on the table.
 */
class DATA_RowDoesntExist extends DATA_Exception {
    
/**
     * The table where the row wasn't found.
     * @var string
     */
    
private $table;
    
    
/**
     * The row index used.
     * @var string
     */
    
private $row;
    
    
/**
     * Default constructor.
     * @param string $table The table.
     * @param mixed $row The row index used.
     */
    
function __construct($table$row) {
        
parent::__construct("{$table}[" var_export($rowtrue) . "] doesn't exist.");
        
$this->table $table;
        
$this->row $row;
    }
    
    
/**
     * Returns the table where the row wasn't found.
     * 
     * @return string The table where the row wasn't found.
     */
    
function getTable() {
        return 
$this->table;
    }
    
    
/**
     * Returns the row index used.
     * 
     * @return mixed The row index used.
     */
    
function getRow() {
        return 
$this->row;
    }
}
?>

 
  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