JObject/ construct
From Joomla! Documentation
< JObject(Difference between revisions)
| (One intermediate revision by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | This is a stub method with empty body. It is required for | + | {{review}} |
| + | This is a stub method with empty body. It is required for smooth work of a hack that allows __construct() in PHP 4. Because [[JObject/JObject|JObject method]] explicitly invokes $this->__construct(), then __construct method must be defined in the JObject class or in its child class. So, to avoid "Call to undefined method" error, we define this method in the JObject class, as we cannot guarantee that a child class will define __construct method. | ||
===See also=== | ===See also=== | ||
Latest revision as of 11:03, 19 December 2008
| This is a article which: needs review. You can help the Joomla! Documentation Wiki by contributing to it. More pages that need help similar to this one are here. If you feel the need is satistified, please remove this notice. While actively editing, consider adding {{inuse}} to reduce edit conflicts. |
This is a stub method with empty body. It is required for smooth work of a hack that allows __construct() in PHP 4. Because JObject method explicitly invokes $this->__construct(), then __construct method must be defined in the JObject class or in its child class. So, to avoid "Call to undefined method" error, we define this method in the JObject class, as we cannot guarantee that a child class will define __construct method.