JObject/ construct

From Joomla! Documentation
< JObject(Difference between revisions)
Jump to: navigation, search
(New page: This is a stub method with empty body. It is required for a smooth work of a hack that allows __construct() in PHP 4. Because JObject method explicitly invokes $this->_...)
 
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
This is a stub method with empty body. It is required for a 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.
+
{{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===
* [http://api.joomla.org/Joomla-Framework/Base/JObject.html#__construct JObject->construct on api.joomla.org]
+
* [http://api.joomla.org/Joomla-Framework/Base/JObject.html#__construct <nowiki>JObject->__construct</nowiki> on api.joomla.org]
 
* [[JObject/JObject|JObject->JObject]]
 
* [[JObject/JObject|JObject->JObject]]
 
<noinclude>[[Category:Development]][[Category:Framework]][[Category:JObject]]</noinclude>
 
<noinclude>[[Category:Development]][[Category:Framework]][[Category:JObject]]</noinclude>

Latest revision as of 11:03, 19 December 2008


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.

[edit] See also

Personal tools
Namespaces

Variants
Actions
Navigation
Joomla! Sites
Toolbox