1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 05:37:39 +02:00

Changed "Access to undeclared property" exception message

This commit is contained in:
David Grudl
2007-06-24 15:07:10 +00:00
parent e2e5ba16f1
commit 5ffbe076f3
4 changed files with 22 additions and 15 deletions

View File

@@ -251,12 +251,11 @@ abstract class DibiDriver
/**
* Undefined property usage prevention
* Access to undeclared property
*/
function __get($nm) { throw new Exception("Undefined property '" . get_class($this) . "::$$nm'"); }
function __set($nm, $val) { $this->__get($nm); }
private function __unset($nm) { $this->__get($nm); }
private function __isset($nm) { $this->__get($nm); }
function __get($nm) { throw new Exception("Access to undeclared property: " . get_class($this) . "::$$nm"); }
function __set($nm, $val) { throw new Exception("Access to undeclared property: " . get_class($this) . "::$$nm"); }
function __unset($nm) { throw new Exception("Access to undeclared property: " . get_class($this) . "::$$nm"); }
} // class DibiDriver

View File

@@ -399,12 +399,11 @@ abstract class DibiResult implements IteratorAggregate, Countable
/**
* Undefined property usage prevention
* Access to undeclared property
*/
function __get($nm) { throw new Exception("Undefined property '" . get_class($this) . "::$$nm'"); }
function __set($nm, $val) { $this->__get($nm); }
private function __unset($nm) { $this->__get($nm); }
private function __isset($nm) { $this->__get($nm); }
function __get($nm) { throw new Exception("Access to undeclared property: " . get_class($this) . "::$$nm"); }
function __set($nm, $val) { throw new Exception("Access to undeclared property: " . get_class($this) . "::$$nm"); }
function __unset($nm) { throw new Exception("Access to undeclared property: " . get_class($this) . "::$$nm"); }
} // class DibiResult

View File

@@ -376,11 +376,10 @@ class DibiTranslator
/**
* Undefined property usage prevention
* Access to undeclared property
*/
function __get($nm) { throw new Exception("Undefined property '" . get_class($this) . "::$$nm'"); }
function __set($nm, $val) { $this->__get($nm); }
private function __unset($nm) { $this->__get($nm); }
private function __isset($nm) { $this->__get($nm); }
function __get($nm) { throw new Exception("Access to undeclared property: " . get_class($this) . "::$$nm"); }
function __set($nm, $val) { throw new Exception("Access to undeclared property: " . get_class($this) . "::$$nm"); }
function __unset($nm) { throw new Exception("Access to undeclared property: " . get_class($this) . "::$$nm"); }
} // class DibiParser

View File

@@ -25,6 +25,16 @@ http://dibi.texy.info/
Dibi.compact
------------
This is shrinked single-file version of whole Dibi, useful when you don't
want to modify library, but just use it.
This is exactly the same as normal version, just only comments and
whitespaces are removed.
-----
For more information, visit the author's weblog (in czech language):