mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Removing PHP4 constructor and __destruct workarounds.
This commit is contained in:
parent
9046083dc8
commit
4f0a9c4dc1
1 changed files with 0 additions and 22 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue