dmBridge PHP API
DMException.php
00001 <?php
00002 #
00003 # dmBridge: a data access framework for CONTENTdm(R)
00004 #
00005 # Copyright © 2009, 2010 Board of Regents of the Nevada System of Higher
00006 # Education, on behalf of the University of Nevada, Las Vegas
00007 #
00008 
00013 class DMException extends Exception implements DMLoggable {
00014 
00016    private $has_been_logged;
00017 
00019    private $http_response_code = 500;
00020 
00026    public function __construct($msg = null, $code = 2) {
00027       ini_set('xdebug.remote_mode', 'jit');
00028       parent::__construct($msg, $code);
00029    }
00030 
00035    public final function hasBeenLogged() {
00036       return $this->has_been_logged;
00037    }
00038 
00042    public final function setHasBeenLogged($bool) {
00043       $this->has_been_logged = ($bool);
00044    }
00045 
00049    public final function getHTTPResponseCode() {
00050       return $this->http_response_code;
00051    }
00052 
00060    public final function setHTTPResponseCode($int) {
00061       $this->http_response_code = $int;
00062    }
00063 
00069    public final function getLogMessage() {
00070       return $this->getMessage();
00071    }
00072 
00078    public final function getLogPriority() {
00079       return $this->getCode();
00080    }
00081 
00087    public function setLogPriority($int) {
00088       $this->setCode($int);
00089    }
00090 
00091 }
 All Data Structures Functions Variables