ballhogjoni Posted October 11, 2010 Share Posted October 11, 2010 I have this line of code in a function but I can't figure out what its doing. $this->Component->init($this); when I print_r($this->Component); i get Component Object ( [__controllerVars] => Array ( [plugin] => [name] => [base] => ) [_loaded] => Array ( ) [_primary] => Array ( ) [__settings] => Array ( ) [_log] => ) There is no init method or object in the Component Object as you can see, so I am lost. Any ideas? Thanks Link to comment https://forums.phpfreaks.com/topic/215622-what-is-init/ Share on other sites More sharing options...
BlueSkyIS Posted October 11, 2010 Share Posted October 11, 2010 There is no init method or object in the Component Object how can you tell there is no method using print_r? Link to comment https://forums.phpfreaks.com/topic/215622-what-is-init/#findComment-1121101 Share on other sites More sharing options...
ballhogjoni Posted October 11, 2010 Author Share Posted October 11, 2010 i can't I went to the class and looked. I guess my statement is misleading. sorry Link to comment https://forums.phpfreaks.com/topic/215622-what-is-init/#findComment-1121104 Share on other sites More sharing options...
BlueSkyIS Posted October 11, 2010 Share Posted October 11, 2010 maybe the object inherits from a class that does have an init() method? Link to comment https://forums.phpfreaks.com/topic/215622-what-is-init/#findComment-1121105 Share on other sites More sharing options...
ballhogjoni Posted October 11, 2010 Author Share Posted October 11, 2010 maybe the object inherits from a class that does have an init() method? ya i figured out what is going on...$this->Component is an instance of another class hidden in another library. I didn't check how $this was created. Thanks Link to comment https://forums.phpfreaks.com/topic/215622-what-is-init/#findComment-1121111 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.