Removing PHP4 constructor and __destruct workarounds.

This commit is contained in:
Mark Story 2010-04-18 01:03:57 -04:00
parent 9046083dc8
commit 4f0a9c4dc1

View file

@ -32,28 +32,6 @@
*/ */
class Object { class Object {
/**
* A hack to support __construct() on PHP 4
* Hint: descendant classes have no PHP4 class_name() constructors,
* so this constructor gets called first and calls the top-layer __construct()
* which (if present) should call parent::__construct()
*
* @return Object
*/
function Object() {
$args = func_get_args();
if (method_exists($this, '__destruct')) {
register_shutdown_function (array(&$this, '__destruct'));
}
call_user_func_array(array(&$this, '__construct'), $args);
}
/**
* Class constructor, overridden in descendant classes.
*/
function __construct() {
}
/** /**
* Object-to-string conversion. * Object-to-string conversion.
* Each class can override this method as necessary. * Each class can override this method as necessary.