Skip to content

Commit

Permalink
Removing PHP4 constructor and __destruct workarounds.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Apr 18, 2010
1 parent 9046083 commit 4f0a9c4
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions cake/libs/object.php
Expand Up @@ -32,28 +32,6 @@
*/
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.
* Each class can override this method as necessary.
Expand Down

0 comments on commit 4f0a9c4

Please sign in to comment.