1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-30 17:29:53 +02:00

improved dibi, Texy and Nette exceptions compatibility

This commit is contained in:
David Grudl
2008-07-12 23:11:57 +00:00
parent 41e5b32a22
commit 69ead6da56
6 changed files with 87 additions and 167 deletions

View File

@@ -30,9 +30,31 @@ if (version_compare(PHP_VERSION, '5.1.0', '<')) {
// nette libraries
/**
* Compatibility with Nette
*/
if (!class_exists('NotImplementedException', FALSE)) {
require_once dirname(__FILE__) . '/Nette/exceptions.php';
class NotImplementedException extends LogicException {}
}
if (!class_exists('NotSupportedException', FALSE)) {
class NotSupportedException extends LogicException {}
}
if (!class_exists('MemberAccessException', FALSE)) {
class MemberAccessException extends LogicException {}
}
if (!class_exists('InvalidStateException', FALSE)) {
class InvalidStateException extends RuntimeException {}
}
if (!class_exists('IOException', FALSE)) {
class IOException extends RuntimeException {}
}
if (!class_exists('FileNotFoundException', FALSE)) {
class FileNotFoundException extends IOException {}
}
if (!class_exists(/*Nette::*/'Object', FALSE)) {